fix: remove unnecessary conditional

both code branches exactly same, so why bother
This commit is contained in:
Ankush Menat 2023-09-20 12:21:40 +05:30
parent d7f4518de3
commit 9a36a09bee

View file

@ -10,22 +10,12 @@
<option value="" disabled selected>{{ __("Select Group By...") }}</option>
{% for (var parent_doctype in group_by_conditions) { %}
{% for (var val in group_by_conditions[parent_doctype]) { %}
{% if (parent_doctype !== doctype) { %}
<option
data-doctype="{{parent_doctype}}"
value="{{group_by_conditions[parent_doctype][val].fieldname}}"
>
{{ __(group_by_conditions[parent_doctype][val].label) }}
({{ __(parent_doctype) }})
</option>
{% } else { %}
<option
data-doctype="{{parent_doctype}}"
value="{{group_by_conditions[parent_doctype][val].fieldname}}"
>
{{ __(group_by_conditions[parent_doctype][val].label || group_by_conditions[parent_doctype][val].fieldname) }}
</option>
{% } %}
{% } %}
{% } %}
</select>