summaryrefslogtreecommitdiffstats
path: root/extensions/BzAPI/template/en/default/config.json.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/BzAPI/template/en/default/config.json.tmpl')
-rw-r--r--extensions/BzAPI/template/en/default/config.json.tmpl9
1 files changed, 3 insertions, 6 deletions
diff --git a/extensions/BzAPI/template/en/default/config.json.tmpl b/extensions/BzAPI/template/en/default/config.json.tmpl
index 993b34915..340a8e650 100644
--- a/extensions/BzAPI/template/en/default/config.json.tmpl
+++ b/extensions/BzAPI/template/en/default/config.json.tmpl
@@ -141,14 +141,11 @@ OLDATTACH2NEW = {
"id": [% component.id FILTER json %],
[% IF show_flags %]
"flag_type": [
- [% flag_types =
- component.flag_types(is_active=>1).bug.merge(component.flag_types(is_active=>1).attachment) %]
- [%-# "first" flag used to get commas right; can't use loop.last() in case
- # last flag is inactive %]
- [% first = 1 %]
+ [% flag_types = component.flag_types(is_active=>1).bug || [] %]
+ [% flag_types = flag_types.merge(component.flag_types(is_active=>1).attachment || []) %]
[% FOREACH flag_type = flag_types %]
[% all_visible_flag_types.${flag_type.id} = flag_type %]
- [% ',' UNLESS first %][% flag_type.id FILTER json %][% first = 0 %]
+ [%- ',' UNLESS loop.first %][% flag_type.id FILTER json %]
[% END %]],
[% END %]
"description": "[% component.description FILTER json %]"