Skip to content

Commit

Permalink
fix: check if settings cache exists (#1994)
Browse files Browse the repository at this point in the history
Co-authored-by: Louis George <lgeorge@mightoaks.com>
  • Loading branch information
lougeo and Louis George committed Aug 17, 2021
1 parent 36b2f4b commit 872b0cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mezzanine/conf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ def use_editable(self):

def clear_cache(self):
"""Clear the settings cache for the current request."""
self._editable_caches.pop(self._current_request, None)
if hasattr(self, "_editable_caches"):
self._editable_caches.pop(self._current_request, None)

def _get_editable(self, request):
"""
Expand Down

0 comments on commit 872b0cd

Please sign in to comment.