Commit ac77b3e4105794c6b9cc6ee9267228e401dadd81
1 parent
5b7cd720
Exists in
master
and in
2 other branches
Resolvendo bug do tipo selecionar todos os estudantes não funciona em pdf_file
Showing
1 changed file
with
3 additions
and
0 deletions
Show diff stats
pdf_file/views.py
... | ... | @@ -154,6 +154,9 @@ class PDFFileCreateView(LoginRequiredMixin, LogMixin , generic.CreateView): |
154 | 154 | if not self.object.topic.visible and not self.object.topic.repository: |
155 | 155 | self.object.visible = False |
156 | 156 | |
157 | + if form.cleaned_data["all_students"]: | |
158 | + self.object.students.add(*self.object.topic.subject.students.all()) | |
159 | + | |
157 | 160 | self.object.save() |
158 | 161 | |
159 | 162 | pend_form = pendencies_form.save(commit = False) | ... | ... |