mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fixes #4326: Exclude Python modules without Script classes from scripts list
This commit is contained in:
@ -5,6 +5,10 @@
|
||||
* [#4323](https://github.com/netbox-community/netbox/issues/4323) - Add bulk edit view for power panels
|
||||
* [#4324](https://github.com/netbox-community/netbox/issues/4324) - Add CSV import view for services
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
* [#4326](https://github.com/netbox-community/netbox/issues/4326) - Exclude Python modules without Script classes from scripts list
|
||||
|
||||
---
|
||||
|
||||
# v2.7.9 (2020-03-06)
|
||||
|
@ -438,7 +438,8 @@ def get_scripts(use_names=False):
|
||||
module_scripts = OrderedDict()
|
||||
for name, cls in inspect.getmembers(module, is_script):
|
||||
module_scripts[name] = cls
|
||||
scripts[module_name] = module_scripts
|
||||
if module_scripts:
|
||||
scripts[module_name] = module_scripts
|
||||
|
||||
return scripts
|
||||
|
||||
|
Reference in New Issue
Block a user