Skip to content
Snippets Groups Projects
Commit 4434211d authored by Tom Teichler's avatar Tom Teichler :beers:
Browse files

Fix syntax

parent ea7fb0a9
No related branches found
No related tags found
1 merge request!6Resolve "Slug for event must not be the short_name of the group"
Pipeline #56300 failed
......@@ -378,7 +378,8 @@ class RegisterEventConsent(ExtensibleForm):
field_instance = forms.BooleanField(
required=True,
label=_(
"I confirm that the retraction of the registration is not possible anymore after {}"
"I confirm that the retraction of the registration is not possible anymore "
"after {}"
).format(event.date_retraction),
)
self.fields["retraction_deadline"] = field_instance
......
......@@ -2,9 +2,9 @@ from datetime import datetime
from django.db import models
from django.urls import reverse
from django.utils.text import slugify
from django.utils.timezone import now
from django.utils.translation import gettext_lazy as _
from django.utils.text import slugify
from ckeditor.fields import RichTextField
from django_iban.fields import IBANField
......@@ -45,7 +45,7 @@ class Event(ExtensibleModel):
information = RichTextField(verbose_name=_("Information about the event"))
terms = models.ManyToManyField(Terms, verbose_name=_("Terms"), related_name="event", blank=True)
def save(self. *args, **kwargs):
def save(self, *args, **kwargs):
if not self.slug:
if self.linked_group.short_name:
self.slug = slugify(self.linked_group.short_name)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment