Remove "default" flag from cloned layouts

This commit is contained in:
Raphael Michel
2020-03-02 09:35:53 +01:00
parent d174b11c6a
commit 00848b3339
2 changed files with 2 additions and 0 deletions

View File

@@ -122,6 +122,7 @@ class LayoutCreate(EventPermissionRequiredMixin, CreateView):
if self.copy_from:
i = modelcopy(self.copy_from)
i.default = False
i.pk = None
kwargs['instance'] = i
kwargs.setdefault('initial', {})