Skip to content

Commit

Permalink
Rollback part of change in api_search.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
ngiger committed Mar 13, 2014
1 parent 92d124d commit d620942
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/state/drugs/api_search.rb
Expand Up @@ -11,7 +11,11 @@ class ApiSearch < State::Drugs::Global
def init
@model = []
if ean = @session.user_input(:ean)
package = @session.app.package_by_ean13(ean13)
if ean.to_s.match(/^7680/)
package = @session.app.package_by_ikskey(ean.to_s[4,8])
else
package = @session.app.package_by_ean13(ean13)
end
if package.is_a?(ODDB::Package)
@model = {
'reg' => package.iksnr,
Expand Down

0 comments on commit d620942

Please sign in to comment.