mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-20 14:45:56 +08:00
Remove unnecesary report element checks in extends.rb
This commit is contained in:
parent
75d7cce6b7
commit
0e71351473
|
@ -34,7 +34,7 @@ class Extends
|
|||
step_table: 10,
|
||||
step_comments: 11,
|
||||
result_comments: 12,
|
||||
project_activity: 13, # TODO
|
||||
project_activity: 13, # NOT USED, kept b/c of integer enums
|
||||
project_samples: 14, # DEPRECATED in SCI-2228, kept b/c of integer enums
|
||||
experiment: 15,
|
||||
# Higher number because of addons
|
||||
|
|
|
@ -148,9 +148,7 @@ module ReportExtends
|
|||
SET_ELEMENT_REFERENCES_LIST = [
|
||||
ElementReference.new(
|
||||
proc do |report_element|
|
||||
report_element.project_header? ||
|
||||
report_element.project_activity? ||
|
||||
report_element.project_samples?
|
||||
report_element.project_header?
|
||||
end,
|
||||
['project_id']
|
||||
),
|
||||
|
@ -159,8 +157,7 @@ module ReportExtends
|
|||
proc do |report_element|
|
||||
report_element.my_module? ||
|
||||
report_element.my_module_protocol? ||
|
||||
report_element.my_module_activity? ||
|
||||
report_element.my_module_samples?
|
||||
report_element.my_module_activity?
|
||||
end,
|
||||
['my_module_id']
|
||||
),
|
||||
|
@ -194,9 +191,7 @@ module ReportExtends
|
|||
ELEMENT_REFERENCES = [
|
||||
ElementReference.new(
|
||||
proc do |report_element|
|
||||
report_element.project_header? ||
|
||||
report_element.project_activity? ||
|
||||
report_element.project_samples?
|
||||
report_element.project_header?
|
||||
end,
|
||||
['project_id']
|
||||
),
|
||||
|
@ -205,8 +200,7 @@ module ReportExtends
|
|||
proc do |report_element|
|
||||
report_element.my_module? ||
|
||||
report_element.my_module_protocol? ||
|
||||
report_element.my_module_activity? ||
|
||||
report_element.my_module_samples?
|
||||
report_element.my_module_activity?
|
||||
end,
|
||||
['my_module_id']
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue