|
@@ -171,7 +171,7 @@ class PlatformIOTCardViewSet(viewsets.ModelViewSet):
|
|
|
|
|
|
|
|
@action(methods=['get'], detail=False, url_path='get_device_type', url_name='get_device_type')
|
|
@action(methods=['get'], detail=False, url_path='get_device_type', url_name='get_device_type')
|
|
|
def get_device_type(self, request, *args, **kwargs):
|
|
def get_device_type(self, request, *args, **kwargs):
|
|
|
- queryset = PlatSimInfo.objects.raw("SELECT id,device_type FROM plat_sim_info GROUP BY device_type;")
|
|
|
|
|
|
|
+ queryset = PlatSimInfo.objects.raw("SELECT device_type FROM plat_sim_info GROUP BY device_type;")
|
|
|
data = []
|
|
data = []
|
|
|
for i in queryset:
|
|
for i in queryset:
|
|
|
data.append(i.device_type)
|
|
data.append(i.device_type)
|