mirror of
https://github.com/jazzband/django-constance.git
synced 2026-03-16 22:40:24 +00:00
tiny optimization
dont query key field since it is not needed
This commit is contained in:
parent
03fe0457ef
commit
26484c8d13
1 changed files with 1 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue