mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-01 19:17:41 +03:00
Correctly handle indexed entries
This commit is contained in:
parent
67cd746135
commit
e871c5178a
@ -193,10 +193,11 @@ def update_yaml_from_url(file_path: str, url: str):
|
|||||||
|
|
||||||
for key_path_str, new_value_list in query_string.items():
|
for key_path_str, new_value_list in query_string.items():
|
||||||
key_path = key_path_str.split(".")
|
key_path = key_path_str.split(".")
|
||||||
for i in range(len(key_path)):
|
key_path_copy = key_path.copy()
|
||||||
|
for i in range(len(key_path_copy)):
|
||||||
try:
|
try:
|
||||||
index = int(key_path[i])
|
index = int(key_path_copy[i])
|
||||||
key_path[i] = (key_path[i - 1], index)
|
key_path[i] = (key_path_copy[i - 1], index)
|
||||||
key_path.pop(i - 1)
|
key_path.pop(i - 1)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user