Skip to content

Commit

Permalink
Fix duplicate default template in listings
Browse files Browse the repository at this point in the history
This hotfix addresses an error where the default template would appear
at least twice when using a different organization to the users
organization affiliated organization.
  • Loading branch information
lagoan committed Jun 17, 2021
1 parent 29fb3c2 commit 18cb2d4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog
## [2.1.3+portage-1.0.10] - 2021-06-03

## [2.1.3+portage-1.0.14] - 2021-06-17

## Fixed
- Remove duplicate listing of default template when chosen organization has a customized default template

## [2.1.3+portage-1.0.13] - 2021-06-16

## Fixed
- Removed references to organizations customized template and to default template
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/template_options_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ def index

customization = Template.default unless customization

@templates.select! { |t| t.id != Template.default.id || t.id != customization.id}

@templates.select! { |t| t.id != Template.default.id && t.id != customization.id}
# We want the default template to appear at the beggining of the list
@templates.unshift(customization)
end
Expand Down

0 comments on commit 18cb2d4

Please sign in to comment.