Commit 280153a4 authored by Thom Wiggers's avatar Thom Wiggers 📐
Browse files

Merge branch 'fix/registration-message-validation' into 'master'

Fix registration message validation

Closes #231

See merge request !421
parents 27d305df f96029bf
......@@ -8,6 +8,7 @@ from django.utils.translation import ugettext_lazy as _
from django.utils.translation import string_concat
from tinymce.models import HTMLField
from thaliawebsite.settings import settings
from utils.translation import ModelTranslateMeta, MultilingualField
......@@ -167,11 +168,12 @@ class Event(models.Model, metaclass=ModelTranslateMeta):
'end': _("Can't have an event travel back in time")})
if self.registration_required():
if self.no_registration_message:
{'no_registration_message': _(
"Doesn't make sense to have this if you require "
for lang in settings.LANGUAGES:
field = 'no_registration_message_' + lang[0]
if getattr(self, field):
{field: _("Doesn't make sense to have this "
"if you require registrations.")})
if not self.registration_start:
{'registration_start': _(
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment