Fix some of the deadlocks on take_snapshot

remotes/origin/issue/4795/notification_even_they_are_disabled
Jesús Espino 2016-07-27 11:56:41 +02:00 committed by David Barragán Merino
parent 0a900cc84d
commit 5214717856
1 changed files with 1 additions and 1 deletions

View File

@ -312,7 +312,7 @@ def take_snapshot(obj: object, *, comment: str="", user=None, delete: bool=False
"""
key = make_key_from_model_object(obj)
with advisory_lock(key):
with advisory_lock("history-"+key):
typename = get_typename_for_model_class(obj.__class__)
new_fobj = freeze_model_instance(obj)