mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Meta.fields should be optional
This commit is contained in:
@@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user