forked from CGM_Public/pretix_original
Fix not allowing program times on event series (API/copy) (#5595)
* Fix not allowing program times on event series (API/copy) * Return 400 when reading endpoint in event series * add docs program times not available on event series * fix isort
This commit is contained in:
committed by
GitHub
parent
e2d9cbb41d
commit
d7b6856322
@@ -2311,6 +2311,8 @@ class ItemProgramTime(models.Model):
|
||||
end = models.DateTimeField(verbose_name=_("End"))
|
||||
|
||||
def clean(self):
|
||||
if self.item.event.has_subevents:
|
||||
raise ValidationError(_("You cannot use program times on an event series."))
|
||||
self.clean_start_end(start=self.start, end=self.end)
|
||||
super().clean()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user