Skip to content

Commit

Permalink
Check for empty 'collection', log warning
Browse files Browse the repository at this point in the history
  • Loading branch information
martimpassos authored Feb 28, 2024
1 parent a835df0 commit 77b1d2c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions imaginerio-etl/entities/item.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,12 @@ def __init__(self, id, row, vocabulary):
self._manifest_path = f"{self._base_path}/manifest.json"

def get_collections(self):
return self._collection.split("|")

if self._collection:
return self._collection.split("|")
else:
logger.warning(f"Item {self._id} isn't associated with any collections")
return []

def get_sizes(self):
logger.debug("Called get_sizes()")
try:
Expand Down

0 comments on commit 77b1d2c

Please sign in to comment.