Skip to content

Commit

Permalink
bug fix (add->merge in update_pinecone.py)
Browse files Browse the repository at this point in the history
  • Loading branch information
henri123lemoine committed Aug 6, 2023
1 parent 684c41e commit 9181b37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion align_data/pinecone/update_pinecone.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def update(self, custom_sources: List[str]):
for article, pinecone_entry in self.process_entries(entries_stream):
self.pinecone_db.upsert_entry(pinecone_entry.dict())
article.pinecone_update_required = False
session.add(article)
session.merge(article)
session.commit()

def process_entries(self, article_stream: Generator[Article, None, None]) -> Generator[Tuple[Article, PineconeEntry], None, None]:
Expand Down

0 comments on commit 9181b37

Please sign in to comment.