From 73e90e7b2267c0f7c163401a1b8d7435962818ad Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 12 Dec 2014 12:53:14 +0100 Subject: Fix history on batch removing of users (refs #2170) --- ishtar_common/models.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ishtar_common') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 1031df71e..a9e778dd6 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -103,7 +103,11 @@ class ValueGetter(object): class HistoricalRecords(BaseHistoricalRecords): def create_historical_record(self, instance, type): - history_modifier = getattr(instance, 'history_modifier', None) + try: + history_modifier = getattr(instance, 'history_modifier', None) + except User.DoesNotExist: + # on batch removing of users, user could have disapeared + return manager = getattr(instance, self.manager_name) attrs = {} for field in instance._meta.fields: -- cgit v1.2.3