From f13f982b189ee16a8c5ed6bbc5d78fde26bcaec1 Mon Sep 17 00:00:00 2001 From: Dmitry Marychev Date: Mon, 22 Jan 2024 15:42:32 +0300 Subject: [PATCH] avoid unnecessary cache invalidation of a django queryset --- .travis.yml | 2 -- access/__init__.py | 2 +- access/plugins.py | 2 +- setup.py | 4 +--- 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6b575d8..64e5cb6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,6 @@ language: python matrix: include: - - python: 2.7 - env: TOXENV="py27-django{1.10,1.11},flake8" - python: 3.6 env: TOXENV="py36-django{1.10,1.11,2.0,2.1,2.2,3.0}" - python: 3.7 diff --git a/access/__init__.py b/access/__init__.py index 18ddfeb..3da0531 100644 --- a/access/__init__.py +++ b/access/__init__.py @@ -1 +1 @@ -__version__ = "0.1.2b1" +__version__ = "0.1.2b2" diff --git a/access/plugins.py b/access/plugins.py index 80532d5..13c6167 100644 --- a/access/plugins.py +++ b/access/plugins.py @@ -78,7 +78,7 @@ def __getattr__(self, name): def method(queryset, request): if request.user.is_superuser: - return queryset.all() + return queryset return apply_method(queryset, request) return method raise AttributeError(name) diff --git a/setup.py b/setup.py index ab3236b..db61fbc 100755 --- a/setup.py +++ b/setup.py @@ -73,8 +73,6 @@ # Specify the Python versions you support here. In particular, ensure # that you indicate whether you support Python 2, Python 3 or both. - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', @@ -129,4 +127,4 @@ # 'sample=sample:main', # ], #}, -) \ No newline at end of file +)