From 4d79797479a3b2f07f9846f11e0d3eff928430c3 Mon Sep 17 00:00:00 2001 From: elsholz Date: Sun, 14 Jan 2024 00:58:07 +0100 Subject: [PATCH] fix wrong var --- api/code/metroplanner_api/v1/endpoints/_planstates.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api/code/metroplanner_api/v1/endpoints/_planstates.py b/api/code/metroplanner_api/v1/endpoints/_planstates.py index 745467b..e6a8037 100644 --- a/api/code/metroplanner_api/v1/endpoints/_planstates.py +++ b/api/code/metroplanner_api/v1/endpoints/_planstates.py @@ -59,18 +59,18 @@ def post_planstate( "last_modified_at": now, } - if plan_details.make_current: + if planstate_data.make_current: set_plan_data["current_state"] = created_result.inserted_id - set_plan_data["current_number_of_edges"] = planstate_data[ + set_plan_data["current_number_of_edges"] = set_planstate_data[ "number_of_edges" ] - set_plan_data["current_number_of_lines"] = planstate_data[ + set_plan_data["current_number_of_lines"] = set_planstate_data[ "number_of_lines" ] - set_plan_data["current_number_of_nodes"] = planstate_data[ + set_plan_data["current_number_of_nodes"] = set_planstate_data[ "number_of_nodes" ] - set_plan_data["current_number_of_labels"] = planstate_data[ + set_plan_data["current_number_of_labels"] = set_planstate_data[ "number_of_labels" ]