fix: Handle the case where can_read does not exist
This commit is contained in:
parent
716f2e850d
commit
957dcbdcda
1 changed files with 1 additions and 1 deletions
|
|
@ -162,7 +162,7 @@ class Workspace:
|
|||
item_type = item_type.lower()
|
||||
|
||||
if item_type == "doctype":
|
||||
return (name in self.can_read and name in self.restricted_doctypes)
|
||||
return (name in self.can_read or [] and name in self.restricted_doctypes or [])
|
||||
if item_type == "page":
|
||||
return (name in self.allowed_pages and name in self.restricted_pages)
|
||||
if item_type == "report":
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue