Skip to content

Commit fdc158d

Browse files
authored
Hotfix qdrant payload creation (#230)
1 parent 27da64b commit fdc158d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

controller/embedding/manager.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,11 +331,21 @@ def update_embedding_payload(
331331
project_id=project_id,
332332
message=f"upload_embedding_payload:{str(embedding_id)}:start",
333333
)
334+
embedding_item = embedding.get(project_id, embedding_id)
335+
if not embedding_item:
336+
return False
337+
# commit to ensure the values are set correct for the embedding container to request
338+
previous_attributes = set(embedding_item.filter_attributes)
339+
embedding_item.filter_attributes = filter_attributes
340+
general.commit()
334341
if connector.update_attribute_payloads_for_neural_search(project_id, embedding_id):
335342
embedding.update_embedding_filter_attributes(
336343
project_id, embedding_id, filter_attributes, with_commit=True
337344
)
338345
return True
346+
embedding.update_embedding_filter_attributes(
347+
project_id, embedding_id, previous_attributes, with_commit=True
348+
)
339349
return False
340350

341351

0 commit comments

Comments
 (0)