Bulk editing of objects can cause an error when using a filtered list #3329

Closed
opened 2025-12-29 18:27:46 +01:00 by adam · 6 comments
Owner

Originally created by @Douglas-Farley on GitHub (Feb 14, 2020).

Originally assigned to: @jeremystretch on GitHub.

Environment

  • Python version: 2.6.8
  • NetBox version: v2.7.6

Steps to Reproduce

  1. Navigate to Manufacturer Page
  2. Select a Manufacturer
  3. Select the Device Type view from Manufacturer
  4. Select any number of devices
  5. Execute "Edit Selected"

Expected Behavior

Get Edit dialog.

Observed Behavior

TypeError at /dcim/device-types/edit/
int() argument must be a string, a bytes-like object or a number, not 'list'

Request Method: POST
https://netbox/dcim/device-types/edit/?manufacturer=oem
2.2.10
TypeError
int() argument must be a string, a bytes-like object or a number, not 'list'
get_prep_value, line 972
/usr/local/bin/uwsgi
3.6.8
Originally created by @Douglas-Farley on GitHub (Feb 14, 2020). Originally assigned to: @jeremystretch on GitHub. ### Environment * Python version: 2.6.8 * NetBox version: v2.7.6 ### Steps to Reproduce 1. Navigate to Manufacturer Page 2. Select a Manufacturer 3. Select the Device Type view from Manufacturer 4. Select any number of devices 5. Execute "Edit Selected" <!-- What did you expect to happen? --> ### Expected Behavior Get Edit dialog. <!-- What happened instead? --> ### Observed Behavior TypeError at /dcim/device-types/edit/ int() argument must be a string, a bytes-like object or a number, not 'list' Request Method: | POST -- | -- https://netbox/dcim/device-types/edit/?manufacturer=oem 2.2.10 TypeError int() argument must be a string, a bytes-like object or a number, not 'list' get_prep_value, line 972 /usr/local/bin/uwsgi 3.6.8
adam added the type: bugstatus: accepted labels 2025-12-29 18:27:46 +01:00
adam closed this issue 2025-12-29 18:27:46 +01:00
Author
Owner

@hSaria commented on GitHub (Feb 14, 2020):

This also affects other views, like platforms http://netbox/dcim/devices/?platform=junos and then bulk edit.

@hSaria commented on GitHub (Feb 14, 2020): This also affects other views, like platforms `http://netbox/dcim/devices/?platform=junos` and then bulk edit.
Author
Owner

@jeremystretch commented on GitHub (Feb 14, 2020):

The root issue here is that the query parameters are erroneously being passed as initial data for the bulk editing form. This should not affect unfiltered lists.

@jeremystretch commented on GitHub (Feb 14, 2020): The root issue here is that the query parameters are erroneously being passed as initial data for the bulk editing form. This should not affect unfiltered lists.
Author
Owner

@robbagithub commented on GitHub (Feb 21, 2020):

#4188 does not appear to be fixed in v2.7.7 If I read the above comments correctly, I would have expected the merged fix for #4216 to be in v2.7.7

@robbagithub commented on GitHub (Feb 21, 2020): #4188 does not appear to be fixed in v2.7.7 If I read the above comments correctly, I would have expected the merged fix for #4216 to be in v2.7.7
Author
Owner

@hSaria commented on GitHub (Feb 21, 2020):

I just tried it and it works fine. Did you restart the NetBox service (i.e. gunicorn) after upgrading? In other words, do you see the new version in the footer? I doubt caching has anything to do with it, but you may also want to try to clear the cache with python3 manage.py invalidate all.

@hSaria commented on GitHub (Feb 21, 2020): I just tried it and it works fine. Did you restart the NetBox service (i.e. gunicorn) after upgrading? In other words, do you see the new version in the footer? I doubt caching has anything to do with it, but you may also want to try to clear the cache with `python3 manage.py invalidate all`.
Author
Owner

@robbagithub commented on GitHub (Feb 21, 2020):

Yep was restarted and I checked the version info is at 2.7.7

I'll try the invalidation.

On Fri, 21 Feb 2020 at 12:10, Saria Hajjar notifications@github.com wrote:

I just tried it and it works fine. Did you restart the NetBox service
(i.e. gunicorn) after upgrading? In other words, do you see the new version
in the footer? I doubt caching has anything to do with it, but you may also
want to try to clear the cache with python3 manage.py invalidate all.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/netbox-community/netbox/issues/4175?email_source=notifications&email_token=AFI7FKWWBN34ITV25UHBJLLRD4SXDA5CNFSM4KVNTMV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMREZMI#issuecomment-589450417,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFI7FKS5GWMKP3FLWNAHUW3RD4SXDANCNFSM4KVNTMVQ
.

@robbagithub commented on GitHub (Feb 21, 2020): Yep was restarted and I checked the version info is at 2.7.7 I'll try the invalidation. On Fri, 21 Feb 2020 at 12:10, Saria Hajjar <notifications@github.com> wrote: > I just tried it and it works fine. Did you restart the NetBox service > (i.e. gunicorn) after upgrading? In other words, do you see the new version > in the footer? I doubt caching has anything to do with it, but you may also > want to try to clear the cache with python3 manage.py invalidate all. > > — > You are receiving this because you commented. > Reply to this email directly, view it on GitHub > <https://github.com/netbox-community/netbox/issues/4175?email_source=notifications&email_token=AFI7FKWWBN34ITV25UHBJLLRD4SXDA5CNFSM4KVNTMV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMREZMI#issuecomment-589450417>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AFI7FKS5GWMKP3FLWNAHUW3RD4SXDANCNFSM4KVNTMVQ> > . >
Author
Owner

@robbagithub commented on GitHub (Feb 21, 2020):

Strangely I've just removed all the old invalid reports and they are still appearing in the UI. We've issued the invalidate and restarted.

Is there some other cache I'm unaware of?
We're going to do that upgrade again.

@robbagithub commented on GitHub (Feb 21, 2020): Strangely I've just removed all the old invalid reports and they are still appearing in the UI. We've issued the invalidate and restarted. Is there some other cache I'm unaware of? We're going to do that upgrade again.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3329