File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
stac_fastapi/sfeos_helpers/stac_fastapi/sfeos_helpers Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -214,7 +214,7 @@ def test_commands(
214214 commands .add (
215215 f"if (ctx._source{ path .es_nest } instanceof ArrayList)"
216216 f"{{if (ctx._source{ path .es_nest } [{ path .es_key } ] != { value } )"
217- f"{{Debug.explain('Test failed `{ path .es_path } `"
217+ f"{{Debug.explain('Test failed `{ path .path } `"
218218 f" != ' + ctx._source{ path .es_path } );}}"
219219 f"}} else "
220220 )
Original file line number Diff line number Diff line change 11"""patch helpers."""
22
33import re
4- from typing import Any , Dict , Optional
4+ from typing import Any , Dict , Optional , Union
55
66from pydantic import BaseModel , model_validator
77
@@ -74,7 +74,7 @@ class ElasticPath(BaseModel):
7474 parts : list [str ] = []
7575
7676 path : Optional [str ] = None
77- key : Optional [str ] = None
77+ key : Optional [Union [ str , int ] ] = None
7878 nest : Optional [str ] = None
7979
8080 es_path : Optional [str ] = None
@@ -114,7 +114,6 @@ def validate_model(cls, data: Any):
114114 if data ["key" ] < 0
115115 else str (data ["key" ])
116116 )
117- # data["es_key"] = f"[{data['key']}]"
118117 data ["es_path" ] = data ["es_nest" ] + f"[{ data ['es_key' ]} ]"
119118
120119 data [
You can’t perform that action at this time.
0 commit comments