Skip to content

Commit

Permalink
Molecules that come out of the db should be marked as validated
Browse files Browse the repository at this point in the history
  • Loading branch information
bennybp committed Jan 6, 2024
1 parent 2141b01 commit 9e16114
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions qcfractal/qcfractal/components/molecules/db_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,9 @@ def model_dict(self, exclude: Optional[Iterable[str]] = None) -> Dict[str, Any]:

d = BaseORM.model_dict(self, exclude)

# Molecules are validated before coming into the database
# Mark them as validated so the client doesn't have to re-validate them
d["validated"] = True

# TODO - this is because the pydantic models are goofy
return {k: v for k, v in d.items() if v is not None}

0 comments on commit 9e16114

Please sign in to comment.