Skip to content

Commit

Permalink
Fix custom script fields being required if they're not
Browse files Browse the repository at this point in the history
  • Loading branch information
Marian Hähnlein committed Jan 29, 2020
1 parent 4629cda commit b732294
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion netbox/extras/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def __init__(self, label='', description='', default=None, required=True):
if default:
self.field_attrs['initial'] = default
if required:
self.field_attrs['required'] = True
self.field_attrs['required'] = required
if 'validators' not in self.field_attrs:
self.field_attrs['validators'] = []

Expand Down

0 comments on commit b732294

Please sign in to comment.