fix update_by_api batch field issue (#10001)

This commit is contained in:
Jyong 2024-10-30 11:17:46 +08:00 committed by GitHub
parent 9ebd453b87
commit e74479717a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -230,7 +230,7 @@ class DocumentUpdateByFileApi(DatasetApiResource):
except ProviderTokenNotInitError as ex:
raise ProviderNotInitializeError(ex.description)
document = documents[0]
documents_and_batch_fields = {"document": marshal(document, document_fields), "batch": batch}
documents_and_batch_fields = {"document": marshal(document, document_fields), "batch": document.batch}
return documents_and_batch_fields, 200