fix: Return dummy function to avoid NoneType not callable
This commit is contained in:
parent
4810d07a8a
commit
d5d0bc8ea9
1 changed files with 3 additions and 1 deletions
|
|
@ -21,7 +21,9 @@ class NamespaceDict(frappe._dict):
|
|||
def __getattr__(self, key):
|
||||
ret = self.get(key)
|
||||
if (not ret and key.startswith("__")) or (key not in self):
|
||||
raise AttributeError(f"module has no attribute '{key}'")
|
||||
def default_function(*args, **kwargs):
|
||||
raise AttributeError(f"module has no attribute '{key}'")
|
||||
return default_function
|
||||
return ret
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue