Check if data is not None before caching

master
Felix Stupp 4 years ago
parent 38fea4eaf4
commit 3b7dfdc181
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -116,7 +116,7 @@ class ApplicationCache():
if cached_data is not None:
return unpacker(cached_data)
data = fun(*args, **kwargs)
if not cache_no_store:
if not cache_no_store and data is not None:
self.store(key=cache_key, data=packer(data))
return data
return decorated

Loading…
Cancel
Save