Unknown formula values default to nil
This commit is contained in:
parent
67b0cd9b66
commit
eba2aaa8aa
@ -104,9 +104,7 @@ class Ingredient < ActiveRecord::Base
|
|||||||
[
|
[
|
||||||
i,
|
i,
|
||||||
input_q.map do |i_q|
|
input_q.map do |i_q|
|
||||||
# FIXME: result for computation with nil values (substituted with 0s)
|
nutrient_data = completed_q[i_q.name][i.id] || [nil, nil]
|
||||||
# should be marked as not precise
|
|
||||||
nutrient_data = completed_q[i_q.name][i.id] || [0, nil]
|
|
||||||
[i_q.name, nutrient_data[0]]
|
[i_q.name, nutrient_data[0]]
|
||||||
end.to_h
|
end.to_h
|
||||||
]
|
]
|
||||||
|
Reference in New Issue
Block a user