Give server default rules the 'default' attribute and fix various brokenness.

This commit is contained in:
David Baker 2015-02-05 15:11:38 +00:00
parent 2df41aa138
commit aaf50bf6f3
3 changed files with 9 additions and 3 deletions

View file

@ -345,7 +345,7 @@ def _priority_class_to_template_name(pc):
def _rule_to_template(rule):
unscoped_rule_id = None
if 'rule_id' in rule:
_rule_id_from_namespaced(rule['rule_id'])
unscoped_rule_id = _rule_id_from_namespaced(rule['rule_id'])
template_name = _priority_class_to_template_name(rule['priority_class'])
if template_name in ['override', 'underride']:
@ -364,6 +364,8 @@ def _rule_to_template(rule):
if unscoped_rule_id:
templaterule['rule_id'] = unscoped_rule_id
if 'default' in rule:
templaterule['default'] = rule['default']
return templaterule