summaryrefslogtreecommitdiff
path: root/archaeological_finds/models_finds.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2021-07-28 12:55:45 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2021-07-29 11:19:51 +0200
commitb36744b9fb5729315ca9ac92919ef8b315f8a3c8 (patch)
tree13ddb6d0e2a7b6e3d78aa8450ebc395b40fc97d1 /archaeological_finds/models_finds.py
parent6dcbeb525acec3b17ec24dfbb0ff4d4d6a797b6f (diff)
downloadIshtar-b36744b9fb5729315ca9ac92919ef8b315f8a3c8.tar.bz2
Ishtar-b36744b9fb5729315ca9ac92919ef8b315f8a3c8.zip
Fix "history_creator" on duplicate
Diffstat (limited to 'archaeological_finds/models_finds.py')
-rw-r--r--archaeological_finds/models_finds.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py
index e53706e9a..706a2bbbf 100644
--- a/archaeological_finds/models_finds.py
+++ b/archaeological_finds/models_finds.py
@@ -2439,6 +2439,10 @@ class Find(
new.upstream_treatment, new.downstream_treatment = None, None
new.uuid = uuid.uuid4()
new.save()
+ if hasattr(user, "user_ptr"):
+ new.history_creator = user.user_ptr
+ new.history_modifier = user.user_ptr
+ new.save()
# m2m fields
m2m = [