summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2014-12-12 12:53:14 +0100
committerÉtienne Loks <etienne.loks@proxience.com>2014-12-12 12:53:14 +0100
commit73e90e7b2267c0f7c163401a1b8d7435962818ad (patch)
tree13999cd5d1595d4210a98a89b9b7a0316aec6e2c /ishtar_common
parent5f676f495bd8b7baa1545db3d706c0e4b50ef3fb (diff)
downloadIshtar-73e90e7b2267c0f7c163401a1b8d7435962818ad.tar.bz2
Ishtar-73e90e7b2267c0f7c163401a1b8d7435962818ad.zip
Fix history on batch removing of users (refs #2170)
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/models.py6
1 files changed, 5 insertions, 1 deletions
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: