diff options
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 |
commit | 7c931d7d31abbda416203d8f0a8459d38c323c17 (patch) | |
tree | f4b46c3a6a21c4351cce0e813e3909e18e0cc5f3 /ishtar_common | |
parent | c3659349ae150ac85ac560a412d4e2febf954f40 (diff) | |
download | Ishtar-7c931d7d31abbda416203d8f0a8459d38c323c17.tar.bz2 Ishtar-7c931d7d31abbda416203d8f0a8459d38c323c17.zip |
Force history date when not provided - 2
Diffstat (limited to 'ishtar_common')
-rw-r--r-- | ishtar_common/models.py | 2 |
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]: |