diff options
-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 3db471b84..a2fdd36f3 100644 --- a/ishtar_common/utils.py +++ b/ishtar_common/utils.py @@ -496,7 +496,9 @@ def _cached_label_changed(sender, **kwargs): sender, ["cached_label_changed", instance.pk] ) cache.set(cache_key, None, settings.CACHE_TASK_TIMEOUT) - return getattr(instance, cached_labels[0], "") + if cached_labels: + return getattr(instance, cached_labels[0], "") + return "" def regenerate_all_cached_labels(model): |