Commit 5251f259 authored by PiTrem's avatar PiTrem
Browse files

do not use sum formula for mol name in report

parent d9998689
...@@ -363,7 +363,7 @@ class Sample < ActiveRecord::Base ...@@ -363,7 +363,7 @@ class Sample < ActiveRecord::Base
def molecule_name_hash def molecule_name_hash
mn = molecule_name mn = molecule_name
mn ? { label: mn.name, value: mn.id } : {} mn ? { label: mn.name, value: mn.id, desc: mn.description } : {}
end end
private private
......
...@@ -438,7 +438,7 @@ module Reporter ...@@ -438,7 +438,7 @@ module Reporter
def sample_molecule_name_delta(sample) def sample_molecule_name_delta(sample)
mnh = sample[:molecule_name_hash] mnh = sample[:molecule_name_hash]
smn = mnh ? mnh[:label] : nil smn = mnh && mnh[:desc] != 'sum_formular' ? mnh[:label] : nil
iupac = sample[:molecule] ? sample[:molecule][:iupac_name] : nil iupac = sample[:molecule] ? sample[:molecule][:iupac_name] : nil
if smn.present? if smn.present?
[{ 'insert' => smn.to_s }] [{ 'insert' => smn.to_s }]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment