diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-10-22 11:45:02 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-10-22 11:45:02 +0200 |
commit | 9be8c9476c6f3cef425f2e1a6e50f67cda525866 (patch) | |
tree | 9e2f5bd2ed79605b7d9c385da55ded771dcac4fc /ishtar_common | |
parent | fce7d00537de1b1c7ff85e2c81581241494e7a04 (diff) | |
download | Ishtar-9be8c9476c6f3cef425f2e1a6e50f67cda525866.tar.bz2 Ishtar-9be8c9476c6f3cef425f2e1a6e50f67cda525866.zip |
cached_label: don't prevent to save history in relevant case
Diffstat (limited to 'ishtar_common')
-rw-r--r-- | ishtar_common/utils.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ishtar_common/utils.py b/ishtar_common/utils.py index 6c1b70863..d72b8b6ba 100644 --- a/ishtar_common/utils.py +++ b/ishtar_common/utils.py @@ -61,11 +61,13 @@ def cached_label_changed(sender, **kwargs): instance._cached_label_checked = True lbl = instance._generate_cached_label() if lbl != instance.cached_label: - instance.skip_history_when_saving = True + if hasattr(instance, '_cascade_change'): + instance.skip_history_when_saving = True instance.cached_label = lbl instance.save() if hasattr(instance, '_get_associated_cached_labels'): for item in instance._get_associated_cached_labels(): + item._cascade_change = True cached_label_changed(item.__class__, instance=item) SHORTIFY_STR = ugettext(" (...)") |