mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-27 18:52:07 +08:00
Merge pull request #6576 from artoscinote/ma_SCI_8587
When unassigning users from task, also delete designated users [SCI-8587]
This commit is contained in:
commit
b8f5ca90f8
1 changed files with 1 additions and 0 deletions
|
@ -28,6 +28,7 @@ module UserAssignments
|
|||
.where(user_assignments: { user: users })
|
||||
.where(projects: project)
|
||||
# rubocop:disable Rails/SkipsModelValidations
|
||||
UserMyModule.where(user: users, my_module: my_modules).delete_all # remove designated users
|
||||
UserAssignment.where(assignable_type: 'MyModule', assignable_id: my_modules, user: users).delete_all
|
||||
my_modules.update_all(updated_at: Time.current)
|
||||
# rubocop:enable Rails/SkipsModelValidations
|
||||
|
|
Loading…
Reference in a new issue