From 56771de5d099eba341ac68215753afe53bbf4618 Mon Sep 17 00:00:00 2001 From: shreddd Date: Thu, 18 Sep 2025 17:08:13 -0700 Subject: [PATCH] Use id as primary key for data --- src/ingest_data.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ingest_data.py b/src/ingest_data.py index 65da995..7e535d2 100644 --- a/src/ingest_data.py +++ b/src/ingest_data.py @@ -129,9 +129,9 @@ def insert_entity(self, entity: Dict) -> Optional[str]: ) return None - # Insert with upsert to handle potential duplicates based on URI + # Insert with upsert to handle potential duplicates based on ID result = self.db.entities.update_one( - {"uri": entity["uri"]}, {"$set": entity}, upsert=True + {"id": entity["id"]}, {"$set": entity}, upsert=True ) if result.upserted_id: