mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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 <kevr@0cost.org>
This commit is contained in:
parent
27fbda5e7b
commit
4525a11d92
1 changed files with 4 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
||||||
import base64
|
import base64
|
||||||
|
import copy
|
||||||
import logging
|
import logging
|
||||||
import math
|
import math
|
||||||
import random
|
import random
|
||||||
|
@ -127,9 +128,10 @@ def as_timezone(dt: datetime, timezone: str):
|
||||||
|
|
||||||
def extend_query(query: Dict[str, Any], *additions) -> Dict[str, Any]:
|
def extend_query(query: Dict[str, Any], *additions) -> Dict[str, Any]:
|
||||||
""" Add additional key value pairs to query. """
|
""" Add additional key value pairs to query. """
|
||||||
|
q = copy.copy(query)
|
||||||
for k, v in list(additions):
|
for k, v in list(additions):
|
||||||
query[k] = v
|
q[k] = v
|
||||||
return query
|
return q
|
||||||
|
|
||||||
|
|
||||||
def to_qs(query: Dict[str, Any]) -> str:
|
def to_qs(query: Dict[str, Any]) -> str:
|
||||||
|
|
Loading…
Add table
Reference in a new issue