summaryrefslogtreecommitdiff
path: root/ishtar_common/model_merging.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/model_merging.py')
-rw-r--r--ishtar_common/model_merging.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ishtar_common/model_merging.py b/ishtar_common/model_merging.py
index c8e2bc6bf..188ec42dd 100644
--- a/ishtar_common/model_merging.py
+++ b/ishtar_common/model_merging.py
@@ -20,7 +20,7 @@ def get_models():
@transaction.atomic
-def merge_model_objects(primary_object, alias_objects=[], keep_old=False):
+def merge_model_objects(primary_object, alias_objects, keep_old=False):
"""
Use this function to merge model objects (i.e. Users, Organizations,
etc.) and migrate all of the related fields from the alias objects to the
@@ -154,5 +154,6 @@ def merge_model_objects(primary_object, alias_objects=[], keep_old=False):
if not keep_old:
alias_object.delete()
+ primary_object.skip_history_when_saving = True
primary_object.save()
return primary_object