diff options
Diffstat (limited to 'ishtar_common')
-rw-r--r-- | ishtar_common/models_common.py | 2 | ||||
-rw-r--r-- | ishtar_common/widgets.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ishtar_common/models_common.py b/ishtar_common/models_common.py index ecbabcf7a..aae79c4fe 100644 --- a/ishtar_common/models_common.py +++ b/ishtar_common/models_common.py @@ -1097,7 +1097,7 @@ class JsonData(models.Model, CachedGen): c = [("", "")] c += [(v, v) for v in sorted(list(choices))] cache.set(cache_key, c, settings.CACHE_SMALLTIMEOUT) - return choices + return c class FixAssociated: diff --git a/ishtar_common/widgets.py b/ishtar_common/widgets.py index 1f5a169ba..4852f4ceb 100644 --- a/ishtar_common/widgets.py +++ b/ishtar_common/widgets.py @@ -140,7 +140,7 @@ class Select2DynamicBase(Select2Media): value = value[0] values = value for va in values: - if va not in [key for key, va in choices]: + if va not in [key for key, v in choices]: choices.insert(1, (va, va)) self.choices = choices klass = attrs and attrs.get("class") or "" |