fix theme creation bug

This commit is contained in:
Gwendolyn 2024-03-29 13:46:35 +01:00
parent f2c0c85ca9
commit 7aecc1a05f

View file

@ -54,7 +54,7 @@ class EditorFormBase(I18nModelFormMixin, ModelForm):
related = locationgroup_theme_colors.get(locationgroup.pk, None)
value = related.fill_color if related is not None else None
other_themes_colors = {
theme_location_group.title: theme_location_group.fill_color
str(theme_location_group.theme.title): theme_location_group.fill_color
for theme_location_group in locationgroup.theme_colors.all()
if related is None or theme_location_group.pk != related.pk
}