mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-22 03:56:53 -06:00
Meta.fields should be optional
This commit is contained in:
parent
0d289d660d
commit
44fd0ebb2d
@ -139,7 +139,7 @@ class Script:
|
||||
vars = OrderedDict()
|
||||
|
||||
# Infer order from Meta.fields (Python 3.5 and lower)
|
||||
fields = getattr(self.Meta, 'fields')
|
||||
fields = getattr(self.Meta, 'fields', [])
|
||||
for name in fields:
|
||||
vars[name] = getattr(self, name)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user