diff options
-rw-r--r-- | ishtar_common/models.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py index ea2f47af2..357140ea4 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -185,7 +185,7 @@ class HistoricalRecords(BaseHistoricalRecords): history_modifier = getattr(instance, 'history_modifier', None) assert history_modifier except (User.DoesNotExist, AssertionError): - # on batch removing of users, user could have disapeared + # on batch removing of users, user could have disappeared return manager = getattr(instance, self.manager_name) attrs = {} @@ -195,7 +195,8 @@ class HistoricalRecords(BaseHistoricalRecords): .filter(history_modifier_id=history_modifier.pk)\ .order_by('-history_date', '-history_id') if not q_history.count(): - manager.create(history_type=type, **attrs) + manager.create(history_type=type, + history_date=datetime.datetime.now(), **attrs) return old_instance = q_history.all()[0] # multiple saving by the same user in a very short time are generaly |