Disabling Autoland through hostingservice admin page does not work (bug 1250263) r?mdoglio draft
authorDan Minor <dminor@mozilla.com>
Wed, 24 Feb 2016 10:09:16 -0800
changeset 7316 505c4d9b89bcde84d713bb01eea1675603817416
parent 7314 bec21744f739531e10b6ef581c34d9983fdbc98f
push id657
push userdminor@mozilla.com
push dateWed, 24 Feb 2016 18:11:19 +0000
reviewersmdoglio
bugs1250263
Disabling Autoland through hostingservice admin page does not work (bug 1250263) r?mdoglio Apparently for these to pass validation with a 'False' value we have to make them not required. MozReview-Commit-ID: 6L73sfF6KVR
pylib/mozreview/mozreview/hostingservice/hmo_repository.py
--- a/pylib/mozreview/mozreview/hostingservice/hmo_repository.py
+++ b/pylib/mozreview/mozreview/hostingservice/hmo_repository.py
@@ -11,28 +11,30 @@ class HMORepositoryForm(HostingServiceFo
         max_length=255,
         required=True,
         widget=forms.TextInput(attrs={'size': '60'}),
         help_text=_('Canonical url for repository'))
 
     autolanding_to_try_enabled = forms.BooleanField(
         initial=False,
         label=_('Autoland to try'),
+        required=False,
         help_text=_('Allow Autolanding to try repository'))
 
     try_repository_url = forms.CharField(
         label=_('Try Repository URL'),
         max_length=255,
         required=False,
         widget=forms.TextInput(attrs={'size': '60'}),
         help_text=_('URL for associated Try repository (if any)'))
 
     autolanding_enabled = forms.BooleanField(
         initial=False,
         label=_('Autoland to landing repository'),
+        required=False,
         help_text=_('Allow Autolanding to landing repository'))
 
     landing_repository_url = forms.CharField(
         label=_('Autoland Repository URL'),
         max_length=255,
         required=False,
         widget=forms.TextInput(attrs={'size': '60'}),
         help_text=_('URL for repository to land completed work (if any)'))