mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 18:40:01 -03:30
add exception type to try-except for access_list details
This commit is contained in:
parent
2f24d28638
commit
3951f63df5
@ -1585,7 +1585,7 @@ class ResourceAccessListElementSerializer(UserSerializer):
|
||||
role_dict['resource_name'] = role.content_object.name
|
||||
role_dict['resource_type'] = role.content_type.name
|
||||
role_dict['related'] = reverse_gfk(role.content_object)
|
||||
except:
|
||||
except AttributeError:
|
||||
pass
|
||||
if role.content_type is not None:
|
||||
role_dict['user_capabilities'] = {'unattach': requesting_user.can_access(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user