Skip to content

Commit

Permalink
error checking
Browse files Browse the repository at this point in the history
  • Loading branch information
adkinsrs committed Sep 20, 2024
1 parent ee0ef77 commit 29932b0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions www/api/resources/orthologs.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ def get(self, dataset_id):

# Get the dataset and organism ID
dataset = geardb.get_dataset_by_id(dataset_id)
if not dataset:
return {"error": "The dataset was not found."}, 400
dataset_organism_id = dataset.organism_id

h5_path = dataset.get_file_path()
Expand Down Expand Up @@ -215,6 +217,8 @@ def post(self, dataset_id):

# Get the dataset and organism ID
dataset = geardb.get_dataset_by_id(dataset_id)
if not dataset:
return {"error": "The dataset was not found."}, 400
dataset_organism_id = dataset.organism_id

# Get the right AnnData object depending on if the analysis is provided
Expand Down

0 comments on commit 29932b0

Please sign in to comment.