Skip to content
This repository has been archived by the owner on Dec 22, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1825 from pgwillia/bug_fixes_from_3.0.112_release
Browse files Browse the repository at this point in the history
Fix errors in Holdings Helper that are causing issues in the most recent deployment
  • Loading branch information
redlibrarian authored Nov 1, 2019
2 parents f6e6bdf + 7f53092 commit f5b0bdd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and releases in Discovery project adheres to [Semantic Versioning](http://semver

## [Unreleased]

### Fixed
- missing variable declaration in Location error handling [#1824](https://github.com/ualbertalib/discovery/issues/1824)
- typo of CirculationRule in Holdings Helper [#1823](https://github.com/ualbertalib/discovery/issues/1823)

### Changed
- updated occurences of University of Alberta Libraries to Library (new name) [#1813](https://github.com/ualbertalib/discovery/issues/1813)

Expand Down
6 changes: 3 additions & 3 deletions app/helpers/holdings_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ def item_type(item)
end

def reserve_rule(item)
CirculationRules.find_by!(short_code: item[:reserve_rule].to_sym).name
CirculationRule.find_by!(short_code: item[:reserve_rule].to_sym).name
rescue ActiveRecord::RecordNotFound => e
Rollbar.error("Error retriving name for CirculationRules #{item[:reserve_rule].to_sym}", e)
Rollbar.error("Error retriving name for CirculationRule #{item[:reserve_rule].to_sym}", e)
'Unknown'
end

Expand Down Expand Up @@ -70,7 +70,7 @@ def request_microform?(item)
# returns the library description that matches the code coming from symphony ws
def library_location(library_code)
Location.find_by!(short_code: library_code.downcase.delete('_').to_sym).name
rescue ActiveRecord::RecordNotFound
rescue ActiveRecord::RecordNotFound => e
Rollbar.error("Error retriving name for Location #{library_code.downcase.delete('_').to_sym}", e)
'Unknown'
end
Expand Down

0 comments on commit f5b0bdd

Please sign in to comment.