Skip to content

Commit

Permalink
Merge pull request #301 from ZdruzenieSTROM/optional_additional_info
Browse files Browse the repository at this point in the history
Povoliť vynechanie additional_info
  • Loading branch information
mmihalik authored Dec 9, 2023
2 parents 39c1e8a + b8af108 commit aed36b2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion competition/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,13 @@ class Meta:
url = models.URLField(verbose_name='url registrácie')
start = models.DateTimeField(verbose_name='Začiatok registrácie')
end = models.DateTimeField(verbose_name='Koniec registrácie')
additional_info = models.TextField(verbose_name='Doplňujúce informácie')
additional_info = models.TextField(
verbose_name='Doplňujúce informácie', null=True, blank=True)

def save(self, *args, **kwargs) -> None:
if not self.additional_info:
self.additional_info = None
return super().save(*args, **kwargs)

def can_user_modify(self, user):
# pylint: disable=no-member
Expand Down

0 comments on commit aed36b2

Please sign in to comment.