openwisp-users icon indicating copy to clipboard operation
openwisp-users copied to clipboard

[bug] `FilterSerializerByOrganization` filters fields without organization

Open pandafy opened this issue 3 years ago • 3 comments

FilterSerializerByOrganization filters queryset of all related fields using the organization_lookup. But, it might be possible that a model does not have relation to Organization (not even an indirect one, e.g. WiFiClient in openwisp-monitoring).

We should allow to exclude fields from the organization filtering.

pandafy avatar Jun 17 '22 13:06 pandafy

@Aryamanz29 do you think this was fixed by https://github.com/openwisp/openwisp-users/commit/670ec9349c27813c130c9421c7b5d7e079230f9e ?

nemesifier avatar May 31 '23 17:05 nemesifier

@Aryamanz29 do you think this was fixed by 670ec93 ?

@nemesifier I don't think this issue has been addressed, and I believe it remained unresolved during the development of multitenant capabilities for the Django Filters feature. This happened because we decided to complete that PR only for the Wi-Fi session REST API. Previously, we were also working on adding a REST API for Wi-Fi clients, and it was during that time that we encountered this bug.

Aryamanz29 avatar Oct 28 '23 15:10 Aryamanz29