Skip to content

Commit

Permalink
list_programs has a tuple return
Browse files Browse the repository at this point in the history
  • Loading branch information
daisieh committed Nov 21, 2024
1 parent a3bcd4c commit 7c62d93
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ingest_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,9 @@ def authorize_program_for_user(user_id):
return response, status_code

# we need to check to see if the program even exists in the system
all_programs = auth.list_programs_in_opa(token)
all_programs, status_code = auth.list_programs_in_opa(token)
if status_code != 200:
return all_programs, status_code
if program_dict["program_id"] not in all_programs:
return {"error": f"Program {program_dict['program_id']} does not exist in {all_programs}"}
response["programs"][program_dict["program_id"]] = program_dict
Expand Down

0 comments on commit 7c62d93

Please sign in to comment.