Merge pull request #1 from xm-repo/xm-repo-patch-1

tiny optimization
This commit is contained in:
Ivan 2025-11-23 02:28:33 +03:00 committed by GitHub
commit 3bcef10480
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -79,7 +79,7 @@ class DatabaseBackend(Backend):
self.autofill()
value = self._cache.get(key)
if value is None:
match = self._model._default_manager.filter(key=key).first()
match = self._model._default_manager.filter(key=key).only("value").first()
if match:
value = loads(match.value)
if self._cache: