Verified Commit 4525a11d authored by Kevin Morris's avatar Kevin Morris
Browse files

fix(FastAPI): change a deep copy instead of original



This was updating offsets and causing unintended behavior.
We should be a bit more functional anyway.
Signed-off-by: Kevin Morris's avatarKevin Morris <kevr@0cost.org>
parent 27fbda5e
Pipeline #11943 passed with stage
in 8 minutes and 11 seconds
import base64
import copy
import logging
import math
import random
......@@ -127,9 +128,10 @@ def as_timezone(dt: datetime, timezone: str):
def extend_query(query: Dict[str, Any], *additions) -> Dict[str, Any]:
""" Add additional key value pairs to query. """
q = copy.copy(query)
for k, v in list(additions):
query[k] = v
return query
q[k] = v
return q
def to_qs(query: Dict[str, Any]) -> str:
......
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