Skip to content

Commit

Permalink
Fix get_by_id
Browse files Browse the repository at this point in the history
  • Loading branch information
jgadling committed Jun 9, 2023
1 parent 453b3a7 commit d948e88
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,9 @@ def get_by_id(cls, client: Client, id: int):
>>> run = Runs.get_by_id(client), 1
print(run.name)
"""
return client.find_one(cls, [cls.id == id])
results = cls.find(client, [cls.id == id])
for result in results:
return result

Check warning on line 261 in client/python/cryoet_data_portal/src/cryoet_data_portal/_gql_base.py

View check run for this annotation

Codecov / codecov/patch

client/python/cryoet_data_portal/src/cryoet_data_portal/_gql_base.py#L259-L261

Added lines #L259 - L261 were not covered by tests

@classmethod
def setup(cls):
Expand Down

0 comments on commit d948e88

Please sign in to comment.