Refactor how parsed_args are passed to methods
This commit is contained in:
parent
daab1b3964
commit
018bf8c5ad
13 changed files with 142 additions and 137 deletions
|
@ -175,11 +175,11 @@ class OrganizationTeam(ApiResource):
|
|||
class TeamMemberList(ApiResource):
|
||||
""" Resource for managing the list of members for a team. """
|
||||
@require_scope(scopes.ORG_ADMIN)
|
||||
@parse_args
|
||||
@parse_args()
|
||||
@query_param('includePending', 'Whether to include pending members', type=truthy_bool,
|
||||
default=False)
|
||||
@nickname('getOrganizationTeamMembers')
|
||||
def get(self, args, orgname, teamname):
|
||||
def get(self, orgname, teamname, parsed_args):
|
||||
""" Retrieve the list of members for the specified team. """
|
||||
view_permission = ViewTeamPermission(orgname, teamname)
|
||||
edit_permission = AdministerOrganizationPermission(orgname)
|
||||
|
@ -194,7 +194,7 @@ class TeamMemberList(ApiResource):
|
|||
members = model.organization.get_organization_team_members(team.id)
|
||||
invites = []
|
||||
|
||||
if args['includePending'] and edit_permission.can():
|
||||
if parsed_args['includePending'] and edit_permission.can():
|
||||
invites = model.team.get_organization_team_member_invites(team.id)
|
||||
|
||||
data = {
|
||||
|
|
Reference in a new issue