Updated date_submitted date when report is finalized.
This commit is contained in:
parent
48e9f043a4
commit
b91778537e
1 changed files with 1 additions and 0 deletions
|
@ -246,6 +246,7 @@ def finalize_report(request, report_pk):
|
||||||
if r.submitted:
|
if r.submitted:
|
||||||
return JsonResponse({"message": "Cannot submit a report that has already been submitted."}, status=409)
|
return JsonResponse({"message": "Cannot submit a report that has already been submitted."}, status=409)
|
||||||
r.submitted = True
|
r.submitted = True
|
||||||
|
r.date_submitted = timezone.now()
|
||||||
r.save()
|
r.save()
|
||||||
# Send email
|
# Send email
|
||||||
send_report_to_admin(request, report_pk, status="FINAL")
|
send_report_to_admin(request, report_pk, status="FINAL")
|
||||||
|
|
Loading…
Reference in a new issue