Skip to content

Commit 41d899c

Browse files
committed
[Fix] Resolve 500 FieldError on DeviceLocationView #1110
Adding organization_lookup = 'organization__in' to the view forces it to use the correct organization field and prevents the crash. Fixes #1110
1 parent 691bae8 commit 41d899c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

openwisp_controller/geo/api/views.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ class DeviceLocationView(
115115
lookup_field = "content_object"
116116
lookup_url_kwarg = "pk"
117117
organization_field = "content_object__organization"
118+
organization_lookup = "organization__in"
118119
_device_field = "content_object"
119120

120121
def get_queryset(self):

0 commit comments

Comments
 (0)