From 257455339c517cc2da94679f930b99293fa26ab2 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 1 Oct 2021 17:23:23 +0200 Subject: Performance on imports: group all post treatment to the end --- ishtar_common/models_common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ishtar_common/models_common.py') diff --git a/ishtar_common/models_common.py b/ishtar_common/models_common.py index 08cfabdab..b34445f36 100644 --- a/ishtar_common/models_common.py +++ b/ishtar_common/models_common.py @@ -1058,7 +1058,7 @@ class JsonData(models.Model, CachedGen): if not current_keys: return for keys in current_keys: - if keys[0] == "__get_dynamic_choices": + if keys and keys[0] == "__get_dynamic_choices": cls._get_dynamic_choices(keys[1], force=True) @classmethod -- cgit v1.2.3