mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-02 21:51:51 +08:00
adds the update action to repository records last_modified_by field when downstreaming assigned records
This commit is contained in:
parent
8dac887f10
commit
0fe499d4a1
1 changed files with 8 additions and 3 deletions
|
@ -471,9 +471,14 @@ class MyModulesController < ApplicationController
|
|||
|
||||
if downstream
|
||||
@my_module.downstream_modules.each do |my_module|
|
||||
records = RepositoryRow.assigned_on_my_module(params[:selected_rows],
|
||||
my_module)
|
||||
my_module.repository_rows.destroy(records & my_module.repository_rows)
|
||||
assigned_records = RepositoryRow.assigned_on_my_module(
|
||||
params[:selected_rows],
|
||||
my_module
|
||||
)
|
||||
my_module.repository_rows.destroy(
|
||||
assigned_records & my_module.repository_rows
|
||||
)
|
||||
assigned_records.update_all(last_modified_by_id: current_user.id)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue