Skip to content
Snippets Groups Projects
Commit 80179a14 authored by Mattia Mancini's avatar Mattia Mancini
Browse files

OSB-44: updating request response

parent 45c71073
No related branches found
No related tags found
2 merge requests!89Monitoring maintenance Epic branch merge,!1Resolve OSB-13 "Monitoringmaintenance "
......@@ -935,15 +935,15 @@ class ControllerStationComponentErrors(ValidableReadOnlyView):
rtsm_errors = self.collect_rtsm_errors()
payload = OrderedDict()
payload['current_status'] = OrderedDict()
for component_type in set(rtsm_errors.keys() | station_test_errors.keys()):
station_test_errors_per_type = station_test_errors.get(component_type, [])
rtsm_errors_per_type = rtsm_errors.get(component_type, [])
payload[component_type] = OrderedDict()
payload[component_type] = sorted(station_test_errors_per_type + rtsm_errors_per_type,
payload[component_type]['errors'] = sorted(station_test_errors_per_type + rtsm_errors_per_type,
key=lambda item: item['start_date'], reverse=True)
payload['current_status'][component_type] = WinCCAntennaStatus.objects. \
payload[component_type]['current_status'] = WinCCAntennaStatus.objects. \
latest_status_per_station_and_component_type(self.station_name,
component_type,
to_date=datetime.datetime.now())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment