mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-10 17:36:33 +08:00
Fix failing tests [SCI-4829]
This commit is contained in:
parent
02a4da1a55
commit
e6e47f5106
2 changed files with 7 additions and 4 deletions
|
@ -527,7 +527,7 @@ class MyModule < ApplicationRecord
|
|||
end
|
||||
|
||||
def assign_default_status_flow
|
||||
return unless my_module_status.blank? || MyModuleStatusFlow.global.any?
|
||||
return if my_module_status.present? || MyModuleStatusFlow.global.blank?
|
||||
|
||||
self.my_module_status = MyModuleStatusFlow.global.first.initial_status
|
||||
end
|
||||
|
|
|
@ -661,9 +661,12 @@ class TeamImporter
|
|||
|
||||
# Find matching status from default flow
|
||||
default_flow = MyModuleStatusFlow.global.first
|
||||
status = default_flow.my_module_statuses.find_by(name: my_module_json['my_module']['my_module_status_name'])
|
||||
status ||= default_flow.initial_status
|
||||
my_module.my_module_status = status
|
||||
|
||||
if default_flow.present?
|
||||
status = default_flow.my_module_statuses.find_by(name: my_module_json['my_module']['my_module_status_name'])
|
||||
status ||= default_flow.initial_status
|
||||
my_module.my_module_status = status
|
||||
end
|
||||
|
||||
my_module.save!
|
||||
@my_module_mappings[orig_my_module_id] = my_module.id
|
||||
|
|
Loading…
Reference in a new issue