Skip to content

Commit 9f86b93

Browse files
committed
style(sdk): strip whitespace when normalizing write_concern for causal-read check
1 parent f6c3f50 commit 9f86b93

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

coordinode/coordinode/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ async def cypher(
278278
# Causal reads (after_index > 0) are only satisfiable when writes were
279279
# acknowledged by a majority; otherwise the referenced index may never
280280
# replicate and the read would hang. Mirror the server's rejection.
281-
if after_index is not None and after_index > 0 and (write_concern or "").lower() != "majority":
281+
if after_index is not None and after_index > 0 and (write_concern or "").strip().lower() != "majority":
282282
raise ValueError(
283283
"after_index > 0 requires write_concern='majority' — causal reads "
284284
"depend on majority-committed writes. Pass write_concern='majority'."

0 commit comments

Comments
 (0)