diff --git a/components/entitiy_ident/entity_ident_service/entity_ident_server.py b/components/entitiy_ident/entity_ident_service/entity_ident_server.py index a87fd2f..3409e5e 100644 --- a/components/entitiy_ident/entity_ident_service/entity_ident_server.py +++ b/components/entitiy_ident/entity_ident_service/entity_ident_server.py @@ -54,16 +54,19 @@ def get_traffic_lights_geo(): }}, {"$redact": { "$cond": { - "if": {"$lte": ["$calculatedRange", "$range"]}, + "if": { + "$lte": ["$calculatedRange", "$range"] + }, "then": "$$KEEP", "else": "$$PRUNE" } }} ] ) + if lat < traffic_light['location'][1] ] - return json_util.dumps({'cursor': traffic_lights}) + return json_util.dumps({'cursor': traffic_lights[:1]}) if __name__ == '__main__':