Skip to content

Commit

Permalink
馃┕ (decorator) Only store things if key is a key
Browse files Browse the repository at this point in the history
  • Loading branch information
simonwoerpel committed Mar 6, 2024
1 parent 6f20b10 commit 6564c58
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion anystore/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ def _inner(*args, **kwargs):
res = func(*args, **kwargs)
if serialize_func is not None:
res = serialize_func(res)
store.put(key, res)
if key is not None:
store.put(key, res)
return res

return _inner
Expand Down

0 comments on commit 6564c58

Please sign in to comment.