diff options
Diffstat (limited to 'archaeological_finds/tests.py')
-rw-r--r-- | archaeological_finds/tests.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/archaeological_finds/tests.py b/archaeological_finds/tests.py index f8f134c0a..3f34ab495 100644 --- a/archaeological_finds/tests.py +++ b/archaeological_finds/tests.py @@ -68,8 +68,11 @@ class FindInit(ContextRecordInit): self.base_finds = [] default = {'label': "Base find"} - if not data_base.get('history_modifier'): - data_base['history_modifier'] = self.get_default_user() + if not data_base.get('history_modifier') or not data_base[ + 'history_modifier'].pk: + user = self.get_default_user() + user.save() + data_base['history_modifier'] = user if force or not data_base.get('context_record'): data_base['context_record'] = self.get_default_context_record( force=force) |