1
0
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:
Jeremy Stretch
2019-08-12 16:59:09 -04:00
parent 0d289d660d
commit 44fd0ebb2d

View File

@@ -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)