diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f2c54d8f..4658880ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/app/helpers/holdings_helper.rb b/app/helpers/holdings_helper.rb index 216d94507..62eb50fc0 100644 --- a/app/helpers/holdings_helper.rb +++ b/app/helpers/holdings_helper.rb @@ -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 @@ -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