diff --git a/swh/indexer/indexer.py b/swh/indexer/indexer.py --- a/swh/indexer/indexer.py +++ b/swh/indexer/indexer.py @@ -622,9 +622,11 @@ def process_journal_objects(self, objects: ObjectsDict) -> Dict: """Worker function for ``JournalClient``. Expects ``objects`` to have a single key, ``"directory"``.""" - assert set(objects) == {"directory"} return self._process_directories( - [(dir_["id"], Directory.from_dict(dir_)) for dir_ in objects["directory"]] + [ + (dir_["id"], Directory.from_dict(dir_)) + for dir_ in objects.get("directory", []) + ] ) def _process_directories(