diff --git a/pyhdx/web/controllers.py b/pyhdx/web/controllers.py index 763090c4..47ff446a 100644 --- a/pyhdx/web/controllers.py +++ b/pyhdx/web/controllers.py @@ -854,12 +854,15 @@ def _action_load_datasets(self) -> None: publications = dataset.metadata.get("publications", []) if publications: for pub in publications: - pub_str = pub["title"] - if "DOI" in pub: - pub_str += f' ([{pub["DOI"]}](https://doi.org/{pub["DOI"]}))' - elif "URL" in pub: - pub_str += f' ([URL]({pub["URL"]}))' - self.parent.logger.info("Publication: " + pub_str) + try: + pub_str = pub["title"] + if "DOI" in pub: + pub_str += f' ([{pub["DOI"]}](https://doi.org/{pub["DOI"]}))' + elif "URL" in pub: + pub_str += f' ([URL]({pub["URL"]}))' + self.parent.logger.info("Publication: " + pub_str) + except (KeyError, TypeError): + pass else: raise ValueError("Invalid input mode")