Skip to content

Commit

Permalink
fix: set proper cache key for singles when name is passed as None (f…
Browse files Browse the repository at this point in the history
…rappe#18667)

[skip ci]
  • Loading branch information
sagarvora authored Oct 29, 2022
1 parent 9c0e111 commit 764370f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frappe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,7 @@ def can_cache_doc(args) -> str | None:
return

doctype = args[0]
name = doctype if len(args) == 1 else args[1]
name = doctype if len(args) == 1 or args[1] is None else args[1]

# Only cache if both doctype and name are strings
if isinstance(doctype, str) and isinstance(name, str):
Expand Down

0 comments on commit 764370f

Please sign in to comment.