Skip to content

Commit

Permalink
Fix bug, None was used instead of empty for DB outage
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanCoding committed Sep 19, 2023
1 parent f7a2de8 commit a2123b3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions awx/conf/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,10 @@ def _get_local_with_cache(self, name):
"""Get value while accepting the in-memory cache if key is available"""
with _ctit_db_wrapper(trans_safe=True):
return self._get_local(name)
# If the last line did not return, that means we hit a database error
# in that case, we should not have a local cache value
# thus, return empty as a signal to use the default
return empty

def __getattr__(self, name):
value = empty
Expand Down

0 comments on commit a2123b3

Please sign in to comment.