Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#847)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 23.12.1 → 24.1.1](psf/black@23.12.1...24.1.1)
- [github.com/pycqa/flake8: 6.1.0 → 7.0.0](PyCQA/flake8@6.1.0...7.0.0)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Feb 9, 2024
1 parent 335a9c5 commit 28d1ae8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repos:
exclude: ^docs/.*|.*.md

- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.1.1
hooks:
- id: black
language_version: python3
Expand All @@ -32,6 +32,6 @@ repos:
args: ["-d", "relaxed"]

- repo: https://github.com/pycqa/flake8
rev: 6.1.0
rev: 7.0.0
hooks:
- id: flake8
6 changes: 3 additions & 3 deletions model_clone/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
1 change: 0 additions & 1 deletion model_clone/mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 28d1ae8

Please sign in to comment.