Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter params not being sent to ObjectBulkUpdateViewMixin and ObjectBulkDestroyViewMixin #4033

Closed
joewesch opened this issue Jun 29, 2023 · 1 comment · Fixed by #4443
Closed
Assignees
Labels
type: bug Something isn't working as expected

Comments

@joewesch
Copy link
Contributor

Environment

  • Nautobot version (Docker tag too if applicable): 1.5.20
  • Python version: 3.8.16
  • Database platform, version:
  • Middleware(s):

Steps to Reproduce

  1. Filter a model's list view that uses the NautobotUIViewSet (like Circuits) that returns a list of items less than the total number of items but still more than the page number (example: https://demo.nautobot.com/circuits/circuits/?&tenant=nautobot-airports) - this causes the "select all" dialog popup
  2. Click the select all checkbox at the top of the list
  3. Select the checkbox that says "Select all 160 circuits matching query"
  4. Click either Edit All or Delete All

Expected Behavior

I expect the number of items that are edited or deleted to be the original filtered queryset (i.e. 160 circuits)

Observed Behavior

Instead it shows:

  • When Editing: "Editing 184 Circuits"
  • When Deleting: "Warning: The following operation will delete 184 circuits. Please carefully review the circuits to be deleted and confirm below."

Analysis

I believe this is due to the request.POST data getting sent to the filterset, but since the filters are query params they are typically in the request.GET data.

@glennmatthews glennmatthews added the type: bug Something isn't working as expected label Jun 29, 2023
@lampwins
Copy link
Member

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working as expected
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants