forked from CGM_Public/pretix_original
Allow to use a custom domain per event (#1617)
* Drop support for maindomain_urls/subdomain_urls in plugins * Allow to use a custom domain per event * Fix bug when manually saving domains * Fix custom domains in debugging * Fix middleware * Fix middleware again, update docs
This commit is contained in:
@@ -95,9 +95,10 @@ class OrganizerUpdateForm(OrganizerForm):
|
||||
raise ValidationError(
|
||||
_('You cannot choose the base domain of this installation.')
|
||||
)
|
||||
if KnownDomain.objects.filter(domainname=d).exclude(organizer=self.instance.pk).exists():
|
||||
if KnownDomain.objects.filter(domainname=d).exclude(organizer=self.instance.pk,
|
||||
event__isnull=True).exists():
|
||||
raise ValidationError(
|
||||
_('This domain is already in use for a different organizer.')
|
||||
_('This domain is already in use for a different event or organizer.')
|
||||
)
|
||||
return d
|
||||
|
||||
|
||||
Reference in New Issue
Block a user