Merge "Fix off by one error in subnetpool choices logic"

This commit is contained in:
Jenkins 2015-09-04 00:59:31 +00:00 committed by Gerrit Code Review
commit 7c296d3f16
1 changed files with 1 additions and 1 deletions

View File

@ -222,7 +222,7 @@ class CreateSubnetInfoAction(workflows.Action):
self.hide_subnetpool_choices()
msg = _('Unable to initialize subnetpools')
exceptions.handle(request, msg)
if len(self.fields['subnetpool'].choices):
if len(self.fields['subnetpool'].choices) > 1:
# Pre-populate prefixlen choices to satisfy Django
# ChoiceField Validation. This is overridden w/data from
# subnetpool on select.