Skip to content

Commit 541c72b

Browse files
committed
Leverage the project projection which handles units.
1 parent cffd188 commit 541c72b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

opensensor/collection_apis.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ def create_nested_pipeline(model: Type[BaseModel], prefix=""):
205205
match_conditions = {}
206206

207207
for field_name, field_type in model.__fields__.items():
208-
if field_name == "timestamp":
209-
pipeline[field_name] = f"${prefix}timestamp"
208+
if field_name in pipeline:
209+
# Skip fields that are already in the pipeline
210210
continue
211211

212212
lookup_field = (

0 commit comments

Comments
 (0)