ArangoDB-Community / pyArango

Python Driver for ArangoDB with built-in validation
https://pyarango.readthedocs.io/en/latest/
Apache License 2.0
238 stars 90 forks source link

Fix bad error check causing bulk import methods to fail #206

Closed cpurules closed 2 years ago

cpurules commented 3 years ago

Fixes #188 and #203

For some reason it seems like the bulkImport methods were expecting the data being POSTed to be altered... the requests library doesn't do that. Since this entirely broke the error checking and thus the methods altogether, I replaced it with a simple status_code check. 201 is successful per the docs, so if it isn't 201, raise an UpdateError with the response data.

(Sorry - got it right this time!)