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 9b4cf12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

### Bug Fixes
1. [#652](https://github.com/influxdata/influxdb-client-python/pull/652): Refactor to `timezone` specific `datetime` helpers to avoid use deprecated functions
1. [#663](https://github.com/influxdata/influxdb-client-python/pull/663): Accept HTTP 201 response to write request

## 1.44.0 [2024-06-24]

Expand Down
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 9b4cf12

Please sign in to comment.