Merge "[TrivialFix]Remove the redundant required=True"

This commit is contained in:
Jenkins 2016-07-22 02:34:04 +00:00 committed by Gerrit Code Review
commit d991fca1e2
4 changed files with 3 additions and 8 deletions

View File

@ -30,7 +30,6 @@ class UsageReportForm(forms.SelfHandlingForm):
("other", _("Other")),
)
period = forms.ThemableChoiceField(label=_("Period"),
required=True,
choices=PERIOD_CHOICES)
date_from = forms.DateField(label=_("From"), required=False,
widget=forms.TextInput(

View File

@ -233,7 +233,7 @@ class UpdateCell(tables.UpdateAction):
class VolumeTypesTable(tables.DataTable):
name = tables.Column("name", verbose_name=_("Name"),
form_field=forms.CharField(
max_length=64, required=True),
max_length=64),
update_action=UpdateCell)
description = tables.Column(lambda obj: getattr(obj, 'description', None),
verbose_name=_('Description'),

View File

@ -180,7 +180,6 @@ class AddRule(forms.SelfHandlingForm):
utils_validators.validate_port_range])
icmp_type = forms.IntegerField(label=_("Type"),
required=True,
help_text=_("Enter a value for ICMP type "
"in the range (-1: 255)"),
widget=forms.TextInput(attrs={
@ -192,7 +191,6 @@ class AddRule(forms.SelfHandlingForm):
validate_icmp_type_range])
icmp_code = forms.IntegerField(label=_("Code"),
required=True,
help_text=_("Enter a value for ICMP code "
"in the range (-1: 255)"),
widget=forms.TextInput(attrs={

View File

@ -179,8 +179,7 @@ class AttachVolume(forms.SelfHandlingForm):
"to hypervisor settings. If not "
"specified, then hypervisor will "
"select a device name."))
instance_id = forms.CharField(widget=forms.HiddenInput(),
required=True)
instance_id = forms.CharField(widget=forms.HiddenInput())
def __init__(self, *args, **kwargs):
super(AttachVolume, self).__init__(*args, **kwargs)
@ -232,8 +231,7 @@ class DetachVolume(forms.SelfHandlingForm):
volume = forms.ChoiceField(label=_("Volume ID"),
help_text=_("Select a volume to detach "
"from this instance."))
instance_id = forms.CharField(widget=forms.HiddenInput(),
required=True)
instance_id = forms.CharField(widget=forms.HiddenInput())
def __init__(self, *args, **kwargs):
super(DetachVolume, self).__init__(*args, **kwargs)