summaryrefslogtreecommitdiff
path: root/openstack_dashboard/dashboards
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-01-03 18:20:45 +0000
committerGerrit Code Review <review@openstack.org>2017-01-03 18:20:46 +0000
commite8055fa3a60a26cd3edf7be03f0657926801d419 (patch)
treeb62c761f41ab2a9f389a6d4569c16cee44d4b010 /openstack_dashboard/dashboards
parent41744208be2b0cc9cd6689326d7646a5abfddbfc (diff)
parent7e150b2c0cb50f5fdd89644eb7334acca3c4ee92 (diff)
downloadhorizon-e8055fa3a60a26cd3edf7be03f0657926801d419.tar.gz
Merge "Make the form _clean_rule_custom method full-fledged"
Diffstat (limited to 'openstack_dashboard/dashboards')
-rw-r--r--openstack_dashboard/dashboards/project/access_and_security/security_groups/forms.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/openstack_dashboard/dashboards/project/access_and_security/security_groups/forms.py b/openstack_dashboard/dashboards/project/access_and_security/security_groups/forms.py
index bd18dbeb9..cfdaabb36 100644
--- a/openstack_dashboard/dashboards/project/access_and_security/security_groups/forms.py
+++ b/openstack_dashboard/dashboards/project/access_and_security/security_groups/forms.py
@@ -344,8 +344,10 @@ class AddRule(forms.SelfHandlingForm):
def _clean_rule_custom(self, cleaned_data, rule_menu):
# custom IP protocol rule so we need to fill unused fields so
# the validation works
- self._update_and_pop_error(cleaned_data, 'icmp_code', None)
- self._update_and_pop_error(cleaned_data, 'icmp_type', None)
+ unused_fields = ['icmp_code', 'icmp_type', 'from_port', 'to_port',
+ 'port']
+ for unused_field in unused_fields:
+ self._update_and_pop_error(cleaned_data, unused_field, None)
def _apply_rule_menu(self, cleaned_data, rule_menu):
cleaned_data['ip_protocol'] = self.rules[rule_menu]['ip_protocol']