File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed
openwisp_controller/geo/api Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -363,7 +363,7 @@ class FloorplanCoordinatesSerializer(serializers.ModelSerializer):
363363
364364 class Meta :
365365 model = DeviceLocation
366- fields = (
366+ fields = [
367367 "name" ,
368368 "mac_address" ,
369369 "is_deactivated" ,
@@ -373,7 +373,7 @@ class Meta:
373373 "floor" ,
374374 "image" ,
375375 "location" ,
376- )
376+ ]
377377
378378 def get_floor_name (self , obj ):
379379 loc_name = obj .floorplan .location .name
@@ -389,5 +389,5 @@ def get_location(self, obj):
389389 detail = {"indoor" : _ ("Floorplan indoor cordinates is null" )}
390390 )
391391
392- x , y = obj .indoor .split ("," , 1 )
392+ y , x = obj .indoor .split ("," , 1 )
393393 return {"lat" : float (y ), "lng" : float (x )}
Original file line number Diff line number Diff line change @@ -217,10 +217,6 @@ def get_queryset(self):
217217 qs = qs .filter (location__id = location_id )
218218 return qs
219219
220- def list (self , request , * args , ** kwargs ):
221- serializer = self .get_serializer (self .get_queryset (), many = True )
222- return Response ({"nodes" : serializer .data , "links" : []})
223-
224220
225221class LocationDeviceList (
226222 FilterByParentManaged , ProtectedAPIMixin , generics .ListAPIView
You can’t perform that action at this time.
0 commit comments