diff --git a/pubchempy.py b/pubchempy.py index 33012ae..b7b8da1 100644 --- a/pubchempy.py +++ b/pubchempy.py @@ -1983,9 +1983,10 @@ def project_category(self) -> ProjectCategory | None: def comments(self) -> list[str]: """Comments and additional information.""" return [ - comment for comment in self.record["assay"]["descr"]["comment"] if comment + comment for comment in self.record["assay"]["descr"].get("comment", "") if comment ] + @property def results(self) -> list[dict[str, t.Any]]: """A list of dictionaries containing details of the results from this Assay."""