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

Story SW-300: improving performances of rtsm error retrieval

parent f535eea2
No related branches found
No related tags found
2 merge requests!89Monitoring maintenance Epic branch merge,!1Resolve OSB-13 "Monitoringmaintenance "
......@@ -24,7 +24,7 @@ class RTSMErrorsViewSet(viewsets.ModelViewSet):
serializer_class = RTSMErrorSummarySerializer
def get_queryset(self):
queryset = RTSMError.objects.defer('average_spectrum', 'bad_spectrum').all()
queryset = RTSMError.objects.all()
for key, param in self.request.query_params.items():
if key in RESERVED_FILTER_NAME:
continue
......@@ -33,7 +33,7 @@ class RTSMErrorsViewSet(viewsets.ModelViewSet):
class RTSMObservationViewSet(viewsets.ModelViewSet):
queryset = RTSMObservation.objects.select_related('errors').defer('errors__average_spectrum', 'errors__bad_spectrum').all()
queryset = RTSMObservation.objects.all()
serializer_class = RTSMObservationSerializer
def get_queryset(self):
......
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