Skip to content

Commit

Permalink
YDA-5775: fix data request internal error
Browse files Browse the repository at this point in the history
  • Loading branch information
leonidastri authored Aug 1, 2024
1 parent 3b943c3 commit 968536e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions datarequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,10 @@ def datarequest_owner_get(ctx, request_id):
+ JSON_EXT)

# Get and return data request owner
return jsonutil.read(ctx, file_path)['owner']
try:
return jsonutil.read(ctx, file_path)['owner']
except Exception:
return None


def datarequest_is_reviewer(ctx, request_id, pending=False):
Expand Down Expand Up @@ -1046,7 +1049,10 @@ def api_datarequest_get(ctx, request_id):
datarequest_action_permitted(ctx, request_id, ["PM", "DM", "DAC", "OWN"], None)

# Get request type
datarequest_type = type_get(ctx, request_id).value
try:
datarequest_type = type_get(ctx, request_id).value
except Exception as e:
return api.Error("datarequest_type_fail", "Error: {}".format(e))

# Get request status
datarequest_status = status_get(ctx, request_id).value
Expand Down

0 comments on commit 968536e

Please sign in to comment.