Skip to content

Commit

Permalink
Fix warning with NULL/emptystring category in achievement list filter.
Browse files Browse the repository at this point in the history
  • Loading branch information
somiaj committed Aug 18, 2024
1 parent 5baddb1 commit 25609fd
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[ maketext('all course achievements') => 'all' ],
[ maketext('selected achievements') => 'selected' ],
[ maketext('enter matching achievement IDs below') => 'match_ids', selected => undef ],
[ maketext('enter matching category below') => 'match_category' ],
[ maketext('select matching category below') => 'match_category' ],
[ maketext('enabled achievements') => 'enabled' ],
[ maketext('disabled achievements') => 'disabled' ]
],
Expand All @@ -27,10 +27,7 @@
<div id="filter_text_err_msg" class="alert alert-danger p-1 mb-2 d-inline-flex d-none">
<%= maketext('Please enter a list of IDs to match.') %>
</div>
% my @categories = $c->db->getAchievementCategories;
% for (@categories) {
% $_ = [$_ => $_];
% }
% my @categories = grep { defined && $_ ne '' } $c->db->getAchievementCategories;
<div id="filter_category_elements" class="row mb-2">
<%= label_for 'filter_category', class => 'col-form-label col-form-label-sm col-sm-auto', begin =%>
<%= maketext('Match on which category?') =%>
Expand Down

0 comments on commit 25609fd

Please sign in to comment.