Oops, fix bug on item page now that translations aren't available
Missed this at first - now that the `name` field is just a normal field and is always English, it's now an error to provide the locale to it as a parameter, like we used to for the translated version of the field!
This commit is contained in:
parent
c75d988497
commit
0e8f457aa1
1 changed files with 2 additions and 2 deletions
|
@ -148,9 +148,9 @@ class Item < ApplicationRecord
|
||||||
def nc_trade_value
|
def nc_trade_value
|
||||||
return nil unless nc?
|
return nil unless nc?
|
||||||
begin
|
begin
|
||||||
OwlsValueGuide.find_by_name(name(:en))
|
OwlsValueGuide.find_by_name(name)
|
||||||
rescue OwlsValueGuide::NotFound => error
|
rescue OwlsValueGuide::NotFound => error
|
||||||
Rails.logger.debug("No NC trade value listed for #{name(:en)} (#{id})")
|
Rails.logger.debug("No NC trade value listed for #{name} (#{id})")
|
||||||
return nil
|
return nil
|
||||||
rescue OwlsValueGuide::NetworkError => error
|
rescue OwlsValueGuide::NetworkError => error
|
||||||
Rails.logger.error("Couldn't load nc_trade_value: #{error.full_message}")
|
Rails.logger.error("Couldn't load nc_trade_value: #{error.full_message}")
|
||||||
|
|
Loading…
Reference in a new issue