Skip to content

Commit

Permalink
Fix issue validating teams all api request
Browse files Browse the repository at this point in the history
  • Loading branch information
Aadesh-Baral committed Mar 24, 2023
1 parent 0a70a63 commit 046e8a9
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion backend/api/teams/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,22 @@ def get(self):
"""
try:
user_id = token_auth.current_user()
search_dto = TeamSearchDTO(dict(request.args))
search_dto = TeamSearchDTO()
search_dto.team_name = request.args.get("team_name", None)
search_dto.member = request.args.get("member", None)
search_dto.manager = request.args.get("manager", None)
search_dto.member_request = request.args.get("member_request", None)
search_dto.team_role = request.args.get("team_role", None)
search_dto.organisation = request.args.get("organisation", None)
search_dto.omit_member_list = strtobool(
request.args.get("omitMemberList", "false")
)
search_dto.full_member_list = strtobool(
request.args.get("fullMemberList", "true")
)
search_dto.paginate = strtobool(request.args.get("paginate", "false"))
search_dto.page = request.args.get("page", 1)
search_dto.per_page = request.args.get("perPage", 10)
search_dto.user_id = user_id
search_dto.validate()

Expand Down

0 comments on commit 046e8a9

Please sign in to comment.