From 2fbeb70a87746138659a8b02ce66bf6f52c6cdf3 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Fri, 2 Jul 2010 12:43:50 +0200 Subject: Excel export for regression datasets fixed --- application.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/application.rb b/application.rb index 6482935..cb5595c 100755 --- a/application.rb +++ b/application.rb @@ -82,8 +82,12 @@ get '/:id' do YAML.load(dataset.yaml).data.each do |line| begin smilestring = RestClient.get(line[0], :accept => 'chemical/x-daylight-smiles').to_s - line[1][0] ? val = line[1][0].first[1] ? "1" : "0" : val = "" - sheet.update_row(i, smilestring , val) + if line[1] + val = line[1][0].first[1] + LOGGER.debug val + #line[1][0] ? val = line[1][0].first[1] #? "1" : "0" : val = "" + sheet.update_row(i, smilestring , val) + end i+=1 rescue end -- cgit v1.2.3