The function of selecting all devices fails. #10921

Closed
opened 2025-12-29 21:37:46 +01:00 by adam · 5 comments
Owner

Originally created by @Wythetells on GitHub (Mar 20, 2025).

Originally assigned to: @antoinekh on GitHub.

Deployment Type

Self-hosted

NetBox Version

v4.2.5

Python Version

3.11

Steps to Reproduce

1、Select all the devices (25 in total) on the current page in the device list.

Image

2、Select the option "Select all 43 devices matching query". and edit

3、Edit the comments and click "Apply".

4、Only 25 devices are updated.

Image

Expected Behavior

all 43 devices are updated.

Observed Behavior

Only 25 devices are updated.

Originally created by @Wythetells on GitHub (Mar 20, 2025). Originally assigned to: @antoinekh on GitHub. ### Deployment Type Self-hosted ### NetBox Version v4.2.5 ### Python Version 3.11 ### Steps to Reproduce 1、Select all the devices (25 in total) on the current page in the device list. ![Image](https://github.com/user-attachments/assets/33820b37-c22d-4a8c-8c90-2c90f14a7b48) 2、Select the option "Select all 43 devices matching query". and edit 3、Edit the comments and click "Apply". 4、Only 25 devices are updated. ![Image](https://github.com/user-attachments/assets/c241fdff-9938-438c-a99f-75d157740930) ### Expected Behavior all 43 devices are updated. ### Observed Behavior Only 25 devices are updated.
adam added the type: bugstatus: acceptedseverity: medium labels 2025-12-29 21:37:46 +01:00
adam closed this issue 2025-12-29 21:37:46 +01:00
Author
Owner

@bctiemann commented on GitHub (Mar 20, 2025):

Verified this. Note for reproduction: set page size to 25 in user preferences, and select filters that result in > 25 results.

@bctiemann commented on GitHub (Mar 20, 2025): Verified this. Note for reproduction: set page size to 25 in user preferences, and select filters that result in > 25 results.
Author
Owner

@antoinekh commented on GitHub (Mar 22, 2025):

I’ll be happy to take this issue

@antoinekh commented on GitHub (Mar 22, 2025): I’ll be happy to take this issue
Author
Owner

@antoinekh commented on GitHub (Mar 23, 2025):

This is not related to devices only but global (IPAdress, Cable, Prefix...)

Same behavior with IPaddress for example :

Edit show all devices but at the end only the devices limit from the page size are updated

@antoinekh commented on GitHub (Mar 23, 2025): This is not related to devices only but global (IPAdress, Cable, Prefix...) Same behavior with IPaddress for example : Edit show all devices but at the end only the devices limit from the page size are updated
Author
Owner

@jeremystretch commented on GitHub (Mar 24, 2025):

@antoinekh assigned to you, thanks

@jeremystretch commented on GitHub (Mar 24, 2025): @antoinekh assigned to you, thanks
Author
Owner

@antoinekh commented on GitHub (Mar 25, 2025):

This issue is on all models (not only devices)

Same issue on the past:
#17963

Fix by @jeremystretch on https://github.com/netbox-community/netbox/pull/17994

Issue seems to have been reinsert here: https://github.com/netbox-community/netbox/pull/18197 to handle the HTMXSelect

Where the else condition disappears

I have readded the last else condition and this fix back the issue

        else:
            form = self.form(initial=initial_data)
            restrict_form_fields(form, request.user)

I'm not sure if this is the way to fix it cleanly, but I've tested it, it works and I don't see any problems.

@antoinekh commented on GitHub (Mar 25, 2025): This issue is on all models (not only devices) Same issue on the past: #17963 Fix by @jeremystretch on https://github.com/netbox-community/netbox/pull/17994 Issue seems to have been reinsert here: https://github.com/netbox-community/netbox/pull/18197 to handle the HTMXSelect Where the else condition disappears I have readded the last else condition and this fix back the issue ``` else: form = self.form(initial=initial_data) restrict_form_fields(form, request.user) ``` I'm not sure if this is the way to fix it cleanly, but I've tested it, it works and I don't see any problems.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10921