mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-23 04:22:01 -06:00
Fixes #5111: Allow use of tuples when specifying ObjectVar query_params
This commit is contained in:
parent
0c8d45f679
commit
695e9ec5d7
@ -1,5 +1,13 @@
|
|||||||
# NetBox v2.9
|
# NetBox v2.9
|
||||||
|
|
||||||
|
## v2.9.4 (FUTURE)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* [#5111](https://github.com/netbox-community/netbox/issues/5111) - Allow use of tuples when specifying ObjectVar `query_params`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## v2.9.3 (2020-09-04)
|
## v2.9.3 (2020-09-04)
|
||||||
|
|
||||||
### Enhancements
|
### Enhancements
|
||||||
|
@ -141,7 +141,7 @@ class APISelect(SelectWithDisabled):
|
|||||||
key = f'data-query-param-{name}'
|
key = f'data-query-param-{name}'
|
||||||
|
|
||||||
values = json.loads(self.attrs.get(key, '[]'))
|
values = json.loads(self.attrs.get(key, '[]'))
|
||||||
if type(value) is list:
|
if type(value) in (list, tuple):
|
||||||
values.extend([str(v) for v in value])
|
values.extend([str(v) for v in value])
|
||||||
else:
|
else:
|
||||||
values.append(str(value))
|
values.append(str(value))
|
||||||
|
Loading…
Reference in New Issue
Block a user