Merge branch 'vysledkovky2'
This commit is contained in:
commit
7334fc5cc5
1 changed files with 4 additions and 1 deletions
|
@ -411,13 +411,16 @@ class NahrajReseniView(LoginRequiredMixin, CreateView):
|
|||
self.object = form.save()
|
||||
self.object.resitele.add(m.Resitel.objects.get(osoba__user = self.request.user))
|
||||
self.object.cas_doruceni = timezone.now()
|
||||
self.object.deadline = m.Deadline.objects.filter(deadline__gte=self.object.cas_doruceni).first()
|
||||
self.object.forma = m.Reseni.FORMA_UPLOAD
|
||||
self.object.save()
|
||||
|
||||
prilohy.instance = self.object
|
||||
prilohy.save()
|
||||
|
||||
for hodnoceni in self.object.hodnoceni_set.all():
|
||||
hodnoceni.deadline_body = m.Deadline.objects.filter(deadline__gte=self.object.cas_doruceni).first()
|
||||
hodnoceni.save()
|
||||
|
||||
# Pošleme mail opravovatelům a garantovi
|
||||
# FIXME: Nechat spočítat databázi? Je to pár dotazů (pravděpodobně), takže to za to možná nestojí
|
||||
prijemci = set()
|
||||
|
|
Loading…
Reference in a new issue