agent-authentic2: test if ou is None in provisionning (#35385)
This commit is contained in:
parent
430c184de6
commit
24477e2fd8
|
@ -104,7 +104,7 @@ class Provisionning(threading.local):
|
|||
# filter user's roles visible by the service's ou
|
||||
roles = [role for role in user_roles.get(user.id, [])
|
||||
if (not role.slug.startswith('_')
|
||||
and (role.ou_id is None or role.ou_id == ou.id))]
|
||||
and (role.ou_id is None or (ou and role.ou_id == ou.id)))]
|
||||
data.update({
|
||||
'uuid': user.uuid,
|
||||
'username': user.username,
|
||||
|
|
Loading…
Reference in New Issue