Use aware time in audit

This commit is contained in:
2020-04-13 16:46:00 +01:00
parent c33ddaee37
commit 0e648329f7
2 changed files with 6 additions and 4 deletions

View File

@@ -14,6 +14,7 @@ from RIGS import versioning
import simplejson
import datetime
from django.utils import timezone
@method_decorator(csrf_exempt, name='dispatch')
@@ -202,7 +203,7 @@ class AssetAudit(AssetEdit):
# TODO For some reason this doesn't stick when done in form_valid??
asset = self.get_object()
asset.last_audited_by = self.request.user
asset.last_audited_at = datetime.datetime.now()
asset.last_audited_at = timezone.now()
asset.save()
return super().get_success_url()