Skip to content
Snippets Groups Projects
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
Branches SHSTK
No related tags found
No related merge requests found
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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment