From 24aefa3e8f50be16df89289ceab46c97bb3f56bd Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 29 Jan 2024 21:02:37 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- model_clone/admin.py | 6 +++--- model_clone/mixin.py | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/model_clone/admin.py b/model_clone/admin.py index fe4a3d62..15c44a7c 100644 --- a/model_clone/admin.py +++ b/model_clone/admin.py @@ -17,9 +17,9 @@ class CloneModelAdminMixin(object): def change_view(self, request, object_id, form_url="", extra_context=None): extra_context = extra_context or {} - extra_context[ - "include_duplicate_object_link" - ] = self.include_duplicate_object_link + extra_context["include_duplicate_object_link"] = ( + self.include_duplicate_object_link + ) if self.include_duplicate_object_link: to_field = request.POST.get(TO_FIELD_VAR, request.GET.get(TO_FIELD_VAR)) if to_field and not self.to_field_allowed(request, to_field): diff --git a/model_clone/mixin.py b/model_clone/mixin.py index e6d383e5..b8868ca6 100644 --- a/model_clone/mixin.py +++ b/model_clone/mixin.py @@ -23,7 +23,6 @@ class CloneMixin(object): - """CloneMixin mixin to duplicate an object using the model's class. :param _clone_fields: Restricted List of fields to copy from the instance.