Skip to content

Commit

Permalink
fix: check None before returning config
Browse files Browse the repository at this point in the history
  • Loading branch information
mumarkhan999 committed Aug 4, 2023
1 parent 159cff9 commit a7b6a64
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Unreleased

* Switch from ``edx-sphinx-theme`` to ``sphinx-book-theme`` since the former is
deprecated
* Fixed ConfigurationModel.current: before returning current config it would make sure it's not None.

[2.3.0] - 2022-01-19
~~~~~~~~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion config_models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def current(cls, *args):
"""
cache_key = cls.cache_key_name(*args)
cached_response = TieredCache.get_cached_response(cache_key)
if cached_response.is_found:
if cached_response.is_found and cached_response.value is not None:
return cached_response.value

key_dict = dict(zip(cls.KEY_FIELDS, args))
Expand Down

0 comments on commit a7b6a64

Please sign in to comment.