diff --git a/LCU/Maintenance/DBInterface/monitoringdb/views/station_test_views.py b/LCU/Maintenance/DBInterface/monitoringdb/views/station_test_views.py index 5424301350d65d28f1a86e58d18f37e8f9745209..511bbbd7e5d0b09ad4c71cee9485ebe835965bed 100644 --- a/LCU/Maintenance/DBInterface/monitoringdb/views/station_test_views.py +++ b/LCU/Maintenance/DBInterface/monitoringdb/views/station_test_views.py @@ -192,7 +192,7 @@ class ControllerStationOverview(APIView): "station_group", required=False, location='query', - schema=coreschema.Enum(['C', 'R', 'I', 'ALL'], description= + schema=coreschema.Enum(['C', 'R', 'I', 'A'], description= 'Station group to select for choices are [C|R|I|ALL]', ) ), @@ -223,16 +223,16 @@ class ControllerStationOverview(APIView): def get(self, request, format=None): - print(request.validate()) - errors_only = request.query_params.get('errors_only', self.DEFAULT_ONLY_ERRORS) - print(request.query_params) + station_group = request.query_params.get('station_group', self.DEFAULT_STATION_GROUP) n_station_tests = int(request.query_params.get('n_station_tests', self.DEFAULT_N_STATION_TESTS)) n_rtsm = request.query_params.get('n_rtsm', self.DEFAULT_N_RTSM) - if station_group is not 'ALL': - station_entities = Station.objects.all() + station_entities = Station.objects.all() + for group in station_group: + if group is not 'A': + station_entities = station_entities.filter(type=group) # Since django preferes a ordered dict over a dict we make it happy... for now response_payload = OrderedDict()