openwisp / openwisp/openwisp-users
[bug] `FilterSerializerByOrganization` filters fields without organization
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 179
- Forks
- 96
- Avg merge
- 13h 40m
- Merged PRs (30d)
- 16
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating FilterSerializerByOrganization and trace how organization_lookup is applied to related fields. Review the WiFiClient example and the linked discussion for the missing-organization case; done means callers can exclude fields with no Organization relation without breaking existing organization filtering.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- django, python
- Domain
- authorization, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100