From 5a7befe8005c10979b7f08426490bd5c32360eba Mon Sep 17 00:00:00 2001 From: Cleiton de Lima Date: Thu, 12 Aug 2021 11:23:20 -0300 Subject: [PATCH] Update advanced.py --- extra_views/advanced.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/extra_views/advanced.py b/extra_views/advanced.py index cf89c6e..cd71baf 100644 --- a/extra_views/advanced.py +++ b/extra_views/advanced.py @@ -1,5 +1,3 @@ -from copy import copy - from django.contrib import messages from django.forms.formsets import all_valid from django.views.generic.base import ContextMixin @@ -49,7 +47,7 @@ def get_inlines(self): """ Returns the inline formset classes """ - return copy(self.inlines) + return self.inlines[:] def forms_valid(self, form, inlines): """ @@ -193,7 +191,7 @@ def get_inlines_names(self): """ Returns a list of names of context variables for each inline in `inlines`. """ - return copy(self.inlines_names) + return self.inlines_names[:] def get_context_data(self, **kwargs): """