Skip to content

Commit

Permalink
Remove test code commited in error
Browse files Browse the repository at this point in the history
  • Loading branch information
jambun committed Oct 10, 2024
1 parent a16ef24 commit b4bfad1
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions backend/model/reftracker_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,13 @@ def self.get_question(question_no)
def self.manuscript_offers(page = 1, offer_number)
offers = []
if offer_number
# resp = ASUtils.json_parse(self.get('getQuestion', {:parameters => {:key => 'question_no', :value => offer_number, :format => 'json'}.to_json}))
resp = ASUtils.json_parse(self.get('getQuestion', {:parameters => {:key => 'question_no', :value => offer_number, :format => 'json'}.to_json}))

# if resp.is_a? Array
# raise ReftrackerAPIException.new("No offer for number #{offer_number}")
# end

# offers << resp
if resp.is_a? Array
raise ReftrackerAPIException.new("No offer for number #{offer_number}")
end

# fake it
offers << ASUtils.json_parse(File.read('/Users/james/projects/nla/data/reftracker_offer_NLAacq87747.json'))
offers << resp
else
columns = [
'question_no',
Expand Down Expand Up @@ -79,10 +76,7 @@ def self.manuscript_offers(page = 1, offer_number)
:pagesize => 200,
}

# offers = ASUtils.json_parse(self.get('search', {:parameters => search_params.to_json}))

# fake it
offers = ASUtils.json_parse(File.read('/Users/james/projects/nla/data/reftracker_offers_sorted.json'))
offers = ASUtils.json_parse(self.get('search', {:parameters => search_params.to_json}))
end

# here's how accession.identifier looks in the db :(
Expand Down

0 comments on commit b4bfad1

Please sign in to comment.