From 0ce2f02b23d987cef035b1bbbac6e881d56adb0f Mon Sep 17 00:00:00 2001 From: sax Date: Sun, 26 Nov 2023 12:23:59 +0100 Subject: [PATCH] fixes check() implementation --- .github/workflows/tests.yaml | 2 +- CHANGES | 5 +++++ src/concurrency/admin.py | 2 +- tests/conftest.py | 5 +++++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 469fa44..5a698d6 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -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}} diff --git a/CHANGES b/CHANGES index 6fbc3b6..d3b68c6 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,8 @@ +(dev) +----- +* BUG FIX: fixes check() implementation + + Release 2.5 ----------- * removes deprecatd MANUAL_TRIGGERS diff --git a/src/concurrency/admin.py b/src/concurrency/admin.py index 6517421..6c4eec4 100644 --- a/src/concurrency/admin.py +++ b/src/concurrency/admin.py @@ -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: diff --git a/tests/conftest.py b/tests/conftest.py index 77dd4eb..379fb0d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,5 +1,7 @@ import os import platform +from pathlib import Path + import sys import pytest @@ -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