fix: only encode if type is not str
This commit is contained in:
parent
5600d84d3c
commit
d9f1a85d00
1 changed files with 1 additions and 1 deletions
|
|
@ -307,7 +307,7 @@ def has_controller_permissions(doc, ptype, user=None):
|
|||
return None
|
||||
|
||||
def get_doctypes_with_read():
|
||||
return list(set([p.parent.encode('UTF8') for p in get_valid_perms()]))
|
||||
return list(set([p.parent if type(p.parent) == str else p.parent.encode('UTF8') for p in get_valid_perms()]))
|
||||
|
||||
def get_valid_perms(doctype=None, user=None):
|
||||
'''Get valid permissions for the current user from DocPerm and Custom DocPerm'''
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue