summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-05-01 11:11:51 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-05-01 11:11:51 +0200
commit39316f9c71948af2b0f6334a5f843feacadc8360 (patch)
treef4b46c3a6a21c4351cce0e813e3909e18e0cc5f3
parentaab89447a6c19bcc1b2594a3fb620b7e57276fed (diff)
downloadIshtar-39316f9c71948af2b0f6334a5f843feacadc8360.tar.bz2
Ishtar-39316f9c71948af2b0f6334a5f843feacadc8360.zip
Force history date when not provided - 2
-rw-r--r--ishtar_common/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index c4e0c9b92..5912c8377 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -204,7 +204,7 @@ class HistoricalRecords(BaseHistoricalRecords):
return
if 'history_date' not in attrs or not attrs['history_date']:
- attrs['history_date'] = datetime.now()
+ attrs['history_date'] = datetime.datetime.now()
# record a new version only if data have been changed
for field in instance._meta.fields:
if getattr(old_instance, field.attname) != attrs[field.attname]: