Skip to content

Commit 42d5d06

Browse files
committed
fix: document conversion is now added!
1 parent 62ee10f commit 42d5d06

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

hivemind_etl/mediawiki/activities.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,11 @@ async def load_mediawiki_data(mediawiki_platform: dict[str, Any]) -> None:
9696
"""Load the transformed MediaWiki data into the database."""
9797
community_id = mediawiki_platform["community_id"]
9898
namespaces = mediawiki_platform["namespaces"]
99+
99100
try:
100-
documents = mediawiki_platform["documents"]
101+
documents_dict = mediawiki_platform["documents"]
102+
# temporal had converted them to dicts, so we need to convert them back to Document objects
103+
documents = [Document.from_dict(doc) for doc in documents_dict]
101104

102105
logging.info(f"Starting data load for community {community_id}")
103106
mediawiki_etl = MediawikiETL(community_id=community_id, namespaces=namespaces)

0 commit comments

Comments
 (0)