diff --git a/sarracenia/flowcb/poll/nasa_cmr.py b/sarracenia/flowcb/poll/nasa_cmr.py index b374f6c47..5b21dc48a 100644 --- a/sarracenia/flowcb/poll/nasa_cmr.py +++ b/sarracenia/flowcb/poll/nasa_cmr.py @@ -322,11 +322,12 @@ def poll(self) -> list: logger.debug(f"Other ({self.o.relatedUrl_type}) URL {url['URL']}") # Skip this URL when other options are defined and don't match logger.debug(f"remove {self.o.relatedUrl_descriptionContains}") - if ( (self.o.relatedUrl_descriptionContains is not None and + if ( (self.o.relatedUrl_descriptionContains is not None and 'Description' in url and all(desc not in url['Description'] for desc in self.o.relatedUrl_descriptionContains)) or (self.o.relatedUrl_urlContains is not None and all(url_c not in url['URL'] for url_c in self.o.relatedUrl_urlContains)) ): - logger.debug(f"Skipping {url['URL']} with Description {url['Description']}..." + + description = url['Description'] if 'Description' in url else "(Not Available)" + logger.debug(f"Skipping {url['URL']} with Description {description}..." + " doesn't match relatedUrl_descriptionContains relatedUrl_urlContains options") else: data_url = url['URL']