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:
Richard Schreiber
2025-11-17 15:36:53 +01:00
committed by GitHub
parent e2d9cbb41d
commit d7b6856322
6 changed files with 20 additions and 5 deletions

View File

@@ -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()