mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-25 01:04:02 +08:00
Create assignment after experiment move [SCI-6285] (#3689)
Co-authored-by: Anton <anton@scinote.net>
This commit is contained in:
parent
a31bcd6eed
commit
8545b5787f
1 changed files with 7 additions and 0 deletions
|
@ -107,6 +107,13 @@ module Experiments
|
|||
# remove user assignments where the user are not present on the project
|
||||
object.user_assignments.destroy_all
|
||||
|
||||
UserAssignment.create!(
|
||||
user: @user,
|
||||
assignable: object,
|
||||
assigned: :automatically,
|
||||
user_role: @project.user_assignments.find_by(user: @user).user_role
|
||||
)
|
||||
|
||||
UserAssignments::GenerateUserAssignmentsJob.perform_later(object, @user)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue