mirror of
https://github.com/pretix/pretix.git
synced 2026-05-11 16:13:59 +00:00
Validate that event and property belong to the same organizer
This commit is contained in:
@@ -1863,6 +1863,8 @@ class EventMetaValue(LoggedModel):
|
|||||||
self.event.cache.clear()
|
self.event.cache.clear()
|
||||||
|
|
||||||
def save(self, *args, **kwargs):
|
def save(self, *args, **kwargs):
|
||||||
|
if self.event and self.event.organizer != self.property.organizer:
|
||||||
|
raise ValidationError(_("Property and event must belong to the same organizer."))
|
||||||
super().save(*args, **kwargs)
|
super().save(*args, **kwargs)
|
||||||
if self.event:
|
if self.event:
|
||||||
self.event.cache.clear()
|
self.event.cache.clear()
|
||||||
|
|||||||
Reference in New Issue
Block a user