From 39316f9c71948af2b0f6334a5f843feacadc8360 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 1 May 2017 11:11:51 +0200 Subject: Force history date when not provided - 2 --- ishtar_common/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ishtar_common/models.py') 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]: -- cgit v1.2.3