diff options
-rw-r--r-- | oslo_policy/sphinxext.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/oslo_policy/sphinxext.py b/oslo_policy/sphinxext.py index 7e92f03..00b90c8 100644 --- a/oslo_policy/sphinxext.py +++ b/oslo_policy/sphinxext.py @@ -51,7 +51,10 @@ def _format_policy_rule(rule): """ yield '``{}``'.format(rule.name) - yield _indent(':Default: ``{}``'.format(rule.check_str)) + if rule.check_str: + yield _indent(':Default: ``{}``'.format(rule.check_str)) + else: + yield _indent(':Default: <empty string>') if hasattr(rule, 'operations'): yield _indent(':Operations:') |