introduce default_fieldset

This commit is contained in:
Ryan Merolle 2023-03-03 09:59:18 -05:00 committed by GitHub
parent f81fab1271
commit c1088549ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -352,6 +352,13 @@ class BaseScript:
# Set initial "commit" checkbox state based on the script's Meta parameter
form.fields['_commit'].initial = getattr(self.Meta, 'commit_default', True)
# Append the default fieldset if defined in the Meta class
default_fieldset = (('Script Execution Functions', ('_schedule_at', '_interval', '_commit')),)
if hasattr(self.Meta, 'fieldsets'):
self.Meta.fieldsets += default_fieldset
else:
pass
return form
# Logging