Updated date_submitted date when report is finalized.

This commit is contained in:
kououken 2019-03-08 22:05:27 -08:00
parent 48e9f043a4
commit b91778537e

View file

@ -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")