WebHost: Allow "random" to be default option for toggles and choices. (#640)

This commit is contained in:
Zach Parks
2022-06-12 05:48:52 +00:00
committed by GitHub
parent c8c025ac34
commit 1bcc5b6582
3 changed files with 9 additions and 2 deletions

View File

@@ -46,6 +46,9 @@ requires:
{%- for suboption_option_id, sub_option_name in option.name_lookup.items() %}
{{ sub_option_name }}: {% if suboption_option_id == option.default %}50{% else %}0{% endif %}
{%- endfor -%}
{% if option.default == "random" %}
random: 50
{%- endif -%}
{%- else %}
{{ yaml_dump(default_converter(option.default)) | indent(4, first=False) }}
{%- endif -%}