Commit 3bc1cf1a authored by pierre.tremouilhac's avatar pierre.tremouilhac
Browse files

Merge branch '257-mol-name-placeholder-in-report' into 'development'

Resolve "mol name placeholder in report"

Closes #257

See merge request !452
parents d9998689 5251f259
......@@ -363,7 +363,7 @@ class Sample < ActiveRecord::Base
def molecule_name_hash
mn = molecule_name
mn ? { label: mn.name, value: mn.id } : {}
mn ? { label: mn.name, value: mn.id, desc: mn.description } : {}
end
private
......
......@@ -438,7 +438,7 @@ module Reporter
def sample_molecule_name_delta(sample)
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
if smn.present?
[{ 'insert' => smn.to_s }]
......
Markdown is supported
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