Skip to content

Commit

Permalink
make sure qc_record.extras exists before accessing it
Browse files Browse the repository at this point in the history
  • Loading branch information
ntBre committed Oct 21, 2024
1 parent c8d7df8 commit 4e97f34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openff/bespokefit/optimizers/forcebalance/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def _standardize_grid_id_str(grid_id: str) -> tuple[Union[int, float]]:


def _get_qc_record_id(qc_record):
return qc_record.extras["id"] if "id" in qc_record.extras else qc_record.id
return qc_record.extras["id"] if qc_record.extras and "id" in qc_record.extras else qc_record.id


class _TargetFactory(Generic[T], abc.ABC):
Expand Down

0 comments on commit 4e97f34

Please sign in to comment.