Merge pull request #6417 from jakemcdermott/no-blank-adhoc-command-module-names

Don't allow blank adhoc command module names

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot] 2020-03-26 19:14:06 +00:00 committed by GitHub
commit 24f334085e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3205,7 +3205,7 @@ class AdHocCommandSerializer(UnifiedJobSerializer):
field_kwargs['choices'] = module_name_choices
field_kwargs['required'] = bool(not module_name_default)
field_kwargs['default'] = module_name_default or serializers.empty
field_kwargs['allow_blank'] = bool(module_name_default)
field_kwargs['allow_blank'] = False
field_kwargs.pop('max_length', None)
return field_class, field_kwargs