Skip to content

Commit 74a0fbf

Browse files
authored
fix(write-api): accept 201 response to write (#663)
InfluxDB v3 will soon return 201 or 204, in cases where InfluxDB v1 and v2 only return 204.
1 parent 653af46 commit 74a0fbf

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

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

67
## 1.44.0 [2024-06-24]
78

influxdb_client/client/write_api_async.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,4 @@ async def write(self, bucket: str, org: str = None,
122122
precision=write_precision, async_req=False,
123123
_return_http_data_only=False,
124124
content_type="text/plain; charset=utf-8")
125-
return response[1] == 204
125+
return response[1] in (201, 204)

0 commit comments

Comments
 (0)