Skip to content

Commit

Permalink
fix(usergroup): handles NoneType error in inspect command
Browse files Browse the repository at this point in the history
The SDK API returns None for projects when there are no projects
associated with a user group. This commit handles that case in the
inspect command.
  • Loading branch information
swagnikdutta authored and pallabpain committed Jul 17, 2023
1 parent 49a4e3a commit df214e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion riocli/usergroup/inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def make_usergroup_inspectable(usergroup: typing.Any):
'creator': usergroup.creator,
'members': [make_user_inspectable(member) for member in usergroup.members],
'admins': [make_user_inspectable(admin) for admin in usergroup.admins],
'projects': [make_project_inspectable(project) for project in usergroup.projects]
'projects': [make_project_inspectable(project) for project in getattr(usergroup, 'projects') or []]
}


Expand Down

0 comments on commit df214e0

Please sign in to comment.