diff --git a/util/cache.py b/util/cache.py index 20c1a97c8..13c0949de 100644 --- a/util/cache.py +++ b/util/cache.py @@ -29,6 +29,7 @@ def no_cache(f): @wraps(f) def add_no_cache(*args, **kwargs): response = f(*args, **kwargs) - response.headers['Cache-Control'] = 'no-cache, no-store, must-revalidate' + if response is not None: + response.headers['Cache-Control'] = 'no-cache, no-store, must-revalidate' return response return add_no_cache