Skip to content

Commit

Permalink
Merge pull request #867 from MolSSI/ds_rec_miss
Browse files Browse the repository at this point in the history
Additional checks if dataset records aren't able to be fetched
  • Loading branch information
bennybp authored Dec 13, 2024
2 parents 1e8efc6 + 8cc0545 commit 6814408
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions qcportal/qcportal/dataset_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,8 @@ def get_record(
record = None
if force_refetch:
records = self._internal_fetch_records([entry_name], [specification_name], None, include)
record = records[0][2]
if records:
record = records[0][2]
elif fetch_updated:
records = self._internal_update_records([entry_name], [specification_name], None, include)
if records:
Expand All @@ -1094,7 +1095,8 @@ def get_record(
if record is None and not self.is_view:
# not in cache
records = self._internal_fetch_records([entry_name], [specification_name], None, include)
record = records[0][2]
if records:
record = records[0][2]

if record is not None and self._client is not None:
record.propagate_client(self._client)
Expand Down

0 comments on commit 6814408

Please sign in to comment.