diff options
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 |
commit | 0081f00f70cfb2bde096f74808bbee0fb6b95752 (patch) | |
tree | 13999cd5d1595d4210a98a89b9b7a0316aec6e2c /ishtar_common/models.py | |
parent | 75a6d74cee499418d6f207d0876b102aa59e4286 (diff) | |
download | Ishtar-0081f00f70cfb2bde096f74808bbee0fb6b95752.tar.bz2 Ishtar-0081f00f70cfb2bde096f74808bbee0fb6b95752.zip |
Fix history on batch removing of users (refs #2170)
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r-- | ishtar_common/models.py | 6 |
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: |