Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v6.0.0
hooks:
- id: check-merge-conflict
- id: requirements-txt-fixer
Expand All @@ -14,7 +14,7 @@ repos:
- id: check-added-large-files
- id: debug-statements
- repo: https://github.com/pycqa/isort
rev: "5.12.0"
rev: "7.0.0"
hooks:
- id: isort
args: ["--profile", "black"]
5 changes: 3 additions & 2 deletions sortedm2m/admin.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from django import forms
from django.conf import settings
from django.utils import translation
from django.contrib.admin.widgets import AutocompleteSelectMultiple
from django.utils import translation


class OrderedAutocomplete(AutocompleteSelectMultiple):
def optgroups(self, name, value, attr=None):
Expand Down Expand Up @@ -48,7 +49,7 @@ def optgroups(self, name, value, attr=None):
class Media:
extra = "" if settings.DEBUG else ".min"
lang = translation.get_language()
js = (
js = (
"admin/js/vendor/jquery/jquery%s.js" % extra,
"admin/js/vendor/select2/select2.full%s.js" % extra,
) + (
Expand Down
2 changes: 1 addition & 1 deletion sortedm2m/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def set(self, objs, *, clear=False, through_defaults=None):
# Force evaluation of `objs` in case it's a queryset whose value
# could be affected by `manager.clear()`. Refs #19816.
# objs = tuple(objs)

db = router.db_for_write(self.through, instance=self.instance)
with transaction.atomic(using=db, savepoint=False):
old_ids = list(
Expand Down
2 changes: 1 addition & 1 deletion sortedm2m/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ def has_changed(self, initial, data):
class SortedCheckboxMultipleChoiceField(SortedMultipleChoiceField):
widget = SortedCheckboxSelectMultiple


Loading