Commit fc25b949 authored by David Sikter's avatar David Sikter
Browse files

Bugfix: modifying query while iterating over it

parent c3b65d9c
Pipeline #96139 passed with stages
in 28 minutes and 2 seconds
...@@ -277,7 +277,9 @@ class WithQuery(BaseModel): ...@@ -277,7 +277,9 @@ class WithQuery(BaseModel):
def _validate_query(query: Query): def _validate_query(query: Query):
if isinstance(query, dict): if isinstance(query, dict):
for key, value in query.items(): for key, value in list(query.items()):
# Note, we loop over a list of items, not query.items(). This is because we
# may modify the query in the loop.
if ':' in key: if ':' in key:
quantity, qualifier = key.split(':') quantity, qualifier = key.split(':')
else: else:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment