add exception type to try-except for access_list details

This commit is contained in:
AlanCoding 2016-09-26 11:31:18 -04:00
parent 2f24d28638
commit 3951f63df5

View File

@ -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(