Trying to add nanopub validation for POST /api/datasets
Using same validation code as in POST /api/nanopubs results in a 500 error (e.g. enabling line 309 in routes/datasets.rb validate_nanopub!(original_bel_statement, nanopub.experiment_context) )
api_1 | Rack::Reloader: reloaded/app/app/openbel/api/routes/nanopubs.rb'
api_1 | DBG: Variable config is "a("2,4-dinitrophenol") -> bp("regulation of oxidative phosphorylation uncoupler activity")"
api_1 | DBG: Variable config is #<BEL::Nanopub::ExperimentContext:0xd5ca05a @values=[{:name=>:Anatomy, :value=>"liver"}, {:name=>:Cell, :value=>"Kupffer Cells"}, {:name=>:CellStructure, :value=>"Mitochondria, Liver"}, {:name=>:Evidence, :value=>"Cationic amphiphilic drugs such as amiodarone, perhexiline, diethylaminoethoxyhexestrol\n"}, {:name=>:Species, :value=>"9606"}, {:name=>:TextLocation, :value=>"Review"}]>
api_1 | DBG: Variable config is "a("2,4-dinitrophenol") -> bp("regulation of oxidative phosphorylation uncoupler activity")"
api_1 | 2017-03-02 21:34:57 - NoMethodError - undefined method function' for nil:NilClass: api_1 | /app/subprojects/bel_parser/lib/bel_parser/language/syntax/invalid_function.rb:22:in map'
`