diff --git a/core/opds_import.py b/core/opds_import.py index b2fc91472e..3eeebcfd4a 100644 --- a/core/opds_import.py +++ b/core/opds_import.py @@ -512,9 +512,10 @@ def import_from_feed( if work: works[key] = work except Exception as e: + collection_name = self.collection.name if self.collection else "None" logging.warning( f"Non-fatal exception: Failed to import item - import will continue: " - f"identifier={key}; collection={self.collection.name}; " + f"identifier={key}; collection={collection_name}/{self._collection_id}; " f"data_source={self.data_source}; exception={e}", stack_info=True, )