Skip to content

Commit

Permalink
YDA-5775: fix internal error in datarequest when user has no access
Browse files Browse the repository at this point in the history
  • Loading branch information
leonidastri authored Aug 1, 2024
1 parent a499923 commit df07d25
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion datarequest/datarequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ def view(request_id: str) -> Response:
if not is_project_manager and not is_datamanager and not is_dac_member and not is_request_owner:
abort(403)

request_info = api.call('datarequest_get', {'request_id': request_id})['data']
request_info = api.call('datarequest_get', {'request_id': request_id})['data']
if not request_info:
abort(403)

request_status = request_info['requestStatus']
human_request_status = human_readable_status[request_status].value
available_documents = request_info['requestAvailableDocuments']
Expand Down

0 comments on commit df07d25

Please sign in to comment.