Skip to content

Commit

Permalink
fix(write-api): accept 201 response to write
Browse files Browse the repository at this point in the history
InfluxDB v3 will soon return 201 or 204, in cases where InfluxDB v1 and v2 only return 204.
  • Loading branch information
jacobmarble committed Aug 7, 2024
1 parent 653af46 commit 4229744
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion influxdb_client/client/write_api_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,4 @@ async def write(self, bucket: str, org: str = None,
precision=write_precision, async_req=False,
_return_http_data_only=False,
content_type="text/plain; charset=utf-8")
return response[1] == 204
return response[1] in (201, 204)

0 comments on commit 4229744

Please sign in to comment.