mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
doc/_ext: check "default" for None
default could be None and we don't reference the default value using `opt.default`, so this variable is always defined. to avoid printing a None default value, check for a None value. see https://jinja.palletsprojects.com/en/2.11.x/templates/#none Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
parent
d1aacf555e
commit
ab7cb630ae
@ -23,7 +23,7 @@ TEMPLATE = '''
|
||||
{{ desc | wordwrap(70) | indent(3) }}
|
||||
{% endif %}
|
||||
:type: ``{{opt.type}}``
|
||||
{%- if default is defined %}
|
||||
{%- if default is not none %}
|
||||
{%- if opt.type == 'size' %}
|
||||
:default: ``{{ default | eval_size | iec_size }}``
|
||||
{%- elif opt.type == 'secs' %}
|
||||
|
Loading…
Reference in New Issue
Block a user