We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5436d63 commit fed129bCopy full SHA for fed129b
easyaudit/utils.py
@@ -1,6 +1,6 @@
1
from __future__ import unicode_literals
2
3
-from uuid import UUID
+import datetime as dt
4
5
from django.conf import settings
6
from django.core.exceptions import ObjectDoesNotExist
@@ -25,7 +25,7 @@ def get_field_value(obj, field):
25
try:
26
value = field.to_python(getattr(obj, field.name, None))
27
if value is not None and settings.USE_TZ and not timezone.is_naive(value):
28
- value = timezone.make_naive(value, timezone=timezone.utc)
+ value = timezone.make_naive(value, timezone=dt.timezone.utc)
29
except ObjectDoesNotExist:
30
value = field.default if field.default is not NOT_PROVIDED else None
31
else:
0 commit comments