Skip to content

Commit 922e418

Browse files
fix: filter queue parameter from location_path args
Co-Authored-By: Rushil Srivastava <[email protected]>
1 parent 5d6dd67 commit 922e418

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fastapi_gcp_tasks/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ def ensure_queue(
3131
"""
3232
# We extract information from the queue path to make the public api simpler
3333
parsed_queue_path = client.parse_queue_path(path=path)
34+
location_args = {k: v for k, v in parsed_queue_path.items() if k in ('project', 'location')}
3435
create_req = tasks_v2.CreateQueueRequest(
35-
parent=location_path(**parsed_queue_path),
36+
parent=location_path(**location_args),
3637
queue=tasks_v2.Queue(name=path, **kwargs),
3738
)
3839
try:

0 commit comments

Comments
 (0)