Skip to content

Commit

Permalink
update method check to a ternary
Browse files Browse the repository at this point in the history
  • Loading branch information
silentworks committed Jun 1, 2024
1 parent f598007 commit 87735cc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions postgrest/_async/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,7 @@ def rpc(
This method now returns a :class:`AsyncFilterRequestBuilder` which allows you to
filter on the RPC's resultset.
"""
method = "POST"
if head or get:
method = "HEAD" if head else "GET"
method = "HEAD" if head else "GET" if get else "POST"

headers = Headers({"Prefer": f"count={count}"}) if count else Headers()

Expand Down

0 comments on commit 87735cc

Please sign in to comment.