mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-06 20:05:55 +08:00
Fix duplicated activities [SCI-12387]
This commit is contained in:
parent
0adf897466
commit
5cb8c7ecde
2 changed files with 2 additions and 0 deletions
|
@ -7,6 +7,7 @@ module AutomationObservers
|
|||
|
||||
project = experiment.project
|
||||
|
||||
return if project.done?
|
||||
return unless project.experiments.active.exists?
|
||||
return if project.experiments.active.where.not(id: project.experiments.active.done).exists?
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ module AutomationObservers
|
|||
class AllTasksDoneObserver < BaseObserver
|
||||
def self.on_update(my_module, user)
|
||||
return unless Current.team.settings.dig('team_automation_settings', 'experiments', 'experiment_status_done', 'on_all_tasks_done')
|
||||
return if my_module.experiment.done?
|
||||
return unless my_module.experiment.my_modules.active.exists?
|
||||
return unless my_module.experiment.my_modules.active.joins(:my_module_status).where.not(my_module_status: MyModuleStatusFlow.first.final_status).none?
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue