mirror of
https://github.com/pretix/pretix.git
synced 2026-05-08 15:44:02 +00:00
Do not use deepcopy on models
This commit is contained in:
@@ -33,6 +33,7 @@ from pretix.control.forms.subevents import (
|
||||
from pretix.control.permissions import EventPermissionRequiredMixin
|
||||
from pretix.control.views import PaginationMixin
|
||||
from pretix.control.views.event import MetaDataEditorMixin
|
||||
from pretix.helpers.models import modelcopy
|
||||
|
||||
|
||||
class SubEventList(EventPermissionRequiredMixin, PaginationMixin, ListView):
|
||||
@@ -424,7 +425,7 @@ class SubEventCreate(SubEventEditorMixin, EventPermissionRequiredMixin, CreateVi
|
||||
kwargs = super().get_form_kwargs()
|
||||
kwargs['event'] = self.request.event
|
||||
if self.copy_from:
|
||||
i = copy.deepcopy(self.copy_from)
|
||||
i = modelcopy(self.copy_from)
|
||||
i.pk = None
|
||||
kwargs['instance'] = i
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user