Skip to content

Commit

Permalink
use paylod instead of parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
bh2smith committed Sep 8, 2023
1 parent 9331652 commit f7ade87
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dune_client/api/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ def create_query(
Creates Dune Query by ID
https://dune.com/docs/api/api-reference/edit-queries/create-query/
"""
parameters = {
payload = {
"name": name,
"query_sql": query_sql,
"private": is_private,
}
if params is not None:
parameters["parameters"] = [p.to_dict() for p in params]
response_json = self._post(route="/query/", params=parameters)
payload["parameters"] = [p.to_dict() for p in params]
response_json = self._post(route="/query/", params=payload)
try:
query_id = int(response_json["query_id"])
# Note that this requires an extra request.
Expand Down

0 comments on commit f7ade87

Please sign in to comment.