Skip to content

Commit

Permalink
fix bug of merging entities (#546)
Browse files Browse the repository at this point in the history
  • Loading branch information
IANTHEREAL authored Dec 25, 2024
1 parent 1604ada commit 2a0a8c3
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,8 @@ def get_or_create_entity(self, entity: Entity, commit: bool = True) -> SQLModel:
db_obj.meta_vec = get_entity_metadata_embedding(
db_obj.meta, self._embed_model
)

self._session.add(db_obj)
if commit:
self._session.commit()
self._session.refresh(db_obj)
Expand Down

0 comments on commit 2a0a8c3

Please sign in to comment.