Fix off by one error in subnetpool choices logic

Change-Id: I9882300f131e73157c5ada35822d12edbbd49fb1
Closes-Bug: 1491321
This commit is contained in:
Frode Nordahl 2015-09-02 12:09:52 +02:00
parent e6e9e9f493
commit 7c9f283f89
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.