# 按照online 排序
This commit is contained in:
parent
3b6ac9ef13
commit
8acbdc24f0
|
@ -45,7 +45,7 @@ class DeviceInfoListAPIView(ListAPIView):
|
|||
search_fields = ['device_id', 'online']
|
||||
|
||||
def get_queryset(self, *args, **kwargs):
|
||||
queryset_list = DeviceInfo.objects.get_queryset().order_by('device_id')
|
||||
queryset_list = DeviceInfo.objects.get_queryset().order_by('-online')
|
||||
device_id = self.request.GET.get('device_id')
|
||||
status = self.request.GET.get('status')
|
||||
if device_id:
|
||||
|
|
Loading…
Reference in New Issue