From a8f2cbdf76c16fc02aaae8bcc07169507e02f624 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Tue, 25 May 2021 09:46:11 +0200 Subject: [PATCH] SubEvent cloning: Do not override name/location with defaults --- src/pretix/control/forms/subevents.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pretix/control/forms/subevents.py b/src/pretix/control/forms/subevents.py index 974773c573..494fd11245 100644 --- a/src/pretix/control/forms/subevents.py +++ b/src/pretix/control/forms/subevents.py @@ -46,7 +46,7 @@ class SubEventForm(I18nModelForm): def __init__(self, *args, **kwargs): self.event = kwargs['event'] instance = kwargs.get('instance') - if instance and not instance.pk: + if instance and not instance.name: kwargs['initial'].setdefault('name', self.event.name) kwargs['initial'].setdefault('location', self.event.location) kwargs['initial'].setdefault('geo_lat', self.event.geo_lat)