If I do something like:
document.data["ocr_engine"] = "azure"
document.save()
while a document is in a processing state from updating the page text, it returns me a failure:
squarelet.exceptions.APIError: 400 - ["You may not update access while the document is processing"]
But the field I'm updating in this case has nothing to do with access, it's just that save() calls a PUT which updates the whole document.
self.client.patch(
f"documents/{document.id}/",
json={"data": {"ocr_engine": ["azure"]}},
)
It would be nice if I could run something like
document.data["ocr_engine"] = "azure"
document.patch(["data"])
which is more clear and doesn't require me to call the bare client.patch method or know it exists.
If I do something like:
while a document is in a processing state from updating the page text, it returns me a failure:
squarelet.exceptions.APIError: 400 - ["You may not update
accesswhile the document is processing"]But the field I'm updating in this case has nothing to do with access, it's just that save() calls a PUT which updates the whole document.
It would be nice if I could run something like
document.data["ocr_engine"] = "azure"
document.patch(["data"])
which is more clear and doesn't require me to call the bare client.patch method or know it exists.