mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-03 19:24:48 +08:00
Merge pull request #2193 from okriuchykhin/ok_SCI_4028
Fix reports in team importer [SCI-4028]
This commit is contained in:
commit
8b665d4f1c
1 changed files with 3 additions and 0 deletions
|
@ -24,6 +24,7 @@ class TeamImporter
|
|||
@result_mappings = {}
|
||||
@checklist_mappings = {}
|
||||
@table_mappings = {}
|
||||
@report_mappings = {}
|
||||
|
||||
@project_counter = 0
|
||||
@repository_counter = 0
|
||||
|
@ -854,12 +855,14 @@ class TeamImporter
|
|||
report_el_parent_mappings = {}
|
||||
report_element_mappings = {}
|
||||
report = Report.new(report_json['report'])
|
||||
orig_report_id = report.id
|
||||
report.id = nil
|
||||
report.project_id = @project_mappings[report.project_id]
|
||||
report.user_id = find_user(report.user_id)
|
||||
report.last_modified_by_id = find_user(report.last_modified_by_id)
|
||||
report.team_id = team.id
|
||||
report.save!
|
||||
@report_mappings[orig_report_id] = report.id
|
||||
@report_counter += 1
|
||||
report_json['report_elements'].each do |report_element_json|
|
||||
report_element = ReportElement.new(report_element_json)
|
||||
|
|
Loading…
Reference in a new issue