misc: do not crash on users that have None as roles (#6755)
This commit is contained in:
parent
854feb4a45
commit
32078370f1
|
@ -224,7 +224,7 @@ class FormPage(Directory):
|
|||
raise errors.AccessUnauthorizedError()
|
||||
if logged_users_role().id not in self.formdef.roles and not (
|
||||
self.user and self.user.is_admin):
|
||||
if self.user:
|
||||
if self.user and self.user.roles:
|
||||
user_roles = set(self.user.roles)
|
||||
else:
|
||||
user_roles = set([])
|
||||
|
|
Loading…
Reference in New Issue