|
|
@ -1178,8 +1178,9 @@ class SubmitSolutionView(LoginRequiredMixin, CreateView): |
|
|
|
with transaction.atomic(): |
|
|
|
self.object = form.save() |
|
|
|
self.object.resitele.add(Resitel.objects.get(osoba__user = self.request.user)) |
|
|
|
self.object.cas_doruceni = datetime.now() |
|
|
|
self.object.cas_doruceni = timezone.now() |
|
|
|
self.object.forma = s.Reseni.FORMA_UPLOAD |
|
|
|
self.object.save() |
|
|
|
if prilohy.is_valid(): |
|
|
|
prilohy.instance = self.object |
|
|
|
prilohy.save() |
|
|
|