Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- Refactor Plan.deep_copy(plan) [#3469](https://github.com/DMPRoadmap/roadmap/pull/3469)
- Fixed a bug in the deep copy of plans where the old identifier was being copied into the new plan. We now copy the generated id of the new plan to the identifier field.
- Fixed bar chart click function in the Usage dashboard (GitHub issue #3443)

- Fix `Template.latest_version` Ambiguity Error [#3474](https://github.com/DMPRoadmap/roadmap/pull/3474)

**Note this upgrade is mainly a migration from Bootstrap 3 to Bootstrap 5.**

Expand Down
4 changes: 4 additions & 0 deletions app/models/template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ class Template < ApplicationRecord
AND current.family_id = templates.family_id
INNER JOIN orgs ON orgs.id = templates.org_id
SQL
# `SELECT "templates.*"` is this scope's default behavior, but it must be explicitly
# specified to prevent `PG::AmbiguousColumn` errors when `.distinct.total_count` is used
# (e.g. in `app/views/layouts/_paginable.html.erb`)
.select('templates.*')
}

# Retrieves the latest customized versions, i.e. those with maximum version
Expand Down
Loading