Skip to content

Commit

Permalink
Avoid nil error when heatmap does not find the corresponding sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
ngiger committed Sep 13, 2017
1 parent 9b71f6c commit eef85e7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/view/drugs/patinfo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ def heatmap(model, session)
link = HtmlGrid::Link.new(:heatmap, model, session, self)
link.set_attribute('title', @lookandfeel.lookup(:heatmap))
seq = model.sequences.first
return nil unless seq
link.href = @lookandfeel._event_url(:show, [
:patinfo, seq.iksnr, seq.seqnr, seq.packages.values.first.ikscd])
link.onclick = <<-EOS
Expand Down

0 comments on commit eef85e7

Please sign in to comment.