Skip to content

Commit

Permalink
fix label count
Browse files Browse the repository at this point in the history
  • Loading branch information
elsholz committed Jan 13, 2024
1 parent c9a096c commit af0ad3a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/code/metroplanner_api/v1/endpoints/_planstates.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ def post_planstate(
set_planstate_data["number_of_edges"] = number_of_edges
set_planstate_data["number_of_lines"] = len(planstate_data.lines)
set_planstate_data["number_of_nodes"] = len(planstate_data.nodes)
set_planstate_data["number_of_labels"] = len(planstate_data.labels)
set_planstate_data["number_of_labels"] = len(
planstate_data.independent_labels
) + len([True for n in planstate_data.nodes.values() if n.label.text])

set_planstate_data["created_at"] = (now := datetime.now().isoformat())

Expand Down

0 comments on commit af0ad3a

Please sign in to comment.