Skip to content

Commit

Permalink
fixes check() implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
saxix committed Nov 26, 2023
1 parent e3ae61a commit 0ce2f02
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
fail-fast: false
matrix:
python-version: [ "3.8", "3.9", "3.10"]
django-version: [ "2.2", "3.2", "4.0", "4.1"]
django-version: [ "3.2", "4.0", "4.2"]
db-engine: ["pg", "mysql"]
env:
PY_VER: ${{ matrix.python-version}}
Expand Down
5 changes: 5 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
(dev)
-----
* BUG FIX: fixes check() implementation


Release 2.5
-----------
* removes deprecatd MANUAL_TRIGGERS
Expand Down
2 changes: 1 addition & 1 deletion src/concurrency/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ class ConcurrentModelAdmin(ConcurrencyActionMixin,
formfield_overrides = {forms.VersionField: {'widget': VersionWidget}}

def check(self, **kwargs):
errors = []
errors = super().check(**kwargs)
if self.fields:
version_field = self.model._concurrencymeta.field
if version_field.name not in self.fields:
Expand Down
5 changes: 5 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import os
import platform
from pathlib import Path

import sys

import pytest
Expand All @@ -14,6 +16,9 @@

skippypy = pytest.mark.skipif(PYPY, reason='skip on pypy')

here = Path(__file__).parent
sys.path.insert(0, str(here / 'tests' / "demoapp"))


def pytest_configure():
from django.conf import settings
Expand Down

0 comments on commit 0ce2f02

Please sign in to comment.