Skip to content

Commit c9ab3be

Browse files
committed
[fix] Change floorplan coordinates to (y,x)
1 parent 7860e87 commit c9ab3be

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

openwisp_controller/geo/api/serializers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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)}

openwisp_controller/geo/api/views.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff 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

225221
class LocationDeviceList(
226222
FilterByParentManaged, ProtectedAPIMixin, generics.ListAPIView

0 commit comments

Comments
 (0)