Skip to content

Commit

Permalink
Fix bug in cfp editor
Browse files Browse the repository at this point in the history
  • Loading branch information
rixx authored and lcduong committed Oct 2, 2024
1 parent 94ff6f8 commit 1e5add4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pretalx/cfp/flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from django.http import HttpResponseNotAllowed
from django.shortcuts import redirect
from django.urls import reverse
from django.utils.functional import cached_property
from django.utils.functional import cached_property, Promise
from django.utils.translation import gettext
from django.utils.translation import gettext_lazy as _
from django.views.generic.base import TemplateResponseMixin
Expand All @@ -42,11 +42,11 @@ def i18n_string(data, locales):
return data
data = copy.deepcopy(data)
with language("en"):
if getattr(data, "_proxy____prepared", None):
if isinstance(data, Promise):
data = str(data)
if isinstance(data, str):
data = {"en": str(data)}
if not isinstance(data, dict):
elif not isinstance(data, dict):
data = {"en": ""}
english = data.get("en", "")

Expand Down

0 comments on commit 1e5add4

Please sign in to comment.