Skip to content

Commit

Permalink
fixed bug:top diameter -> top position
Browse files Browse the repository at this point in the history
  • Loading branch information
JJFlorian committed Aug 14, 2024
1 parent c4abebe commit 0898112
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions api/bro_import/object_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,15 +341,15 @@ def _save_monitoringtubes_data(
"numberOfGeoOhmCables", None
),
"geo_ohm_cables": geo_ohm_data or [],
"tube_top_diameter": self._lookup_most_recent_top_position(
monitoringtube, event_data
"tube_top_diameter": monitoringtube.get("tubeTopDiameter", {}).get(
"@xsi:nil", None
),
"variable_diameter": monitoringtube.get("variableDiameter", None),
"tube_status": monitoringtube.get("tubeStatus", {}).get(
"#text", None
),
"tube_top_position": monitoringtube.get("tubeTopPosition", {}).get(
"#text", None
"tube_top_position": self._lookup_most_recent_top_position(
monitoringtube, event_data
),
"tube_top_positioning_method": monitoringtube.get(
"tubeTopPositioningMethod", {}
Expand Down Expand Up @@ -403,8 +403,6 @@ def _lookup_most_recent_top_position(
intermediate_events = [intermediate_events]

for intermediate_event in intermediate_events:
print(type(intermediate_event))
print(intermediate_event)
if (
intermediate_event.get("eventName", {}).get("#text")
== "nieuweInmetingPosities"
Expand Down

0 comments on commit 0898112

Please sign in to comment.