mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-24 14:05:32 +08:00
Fix deletion of inconfirmed users [SCI-3351]
This commit is contained in:
parent
49a790c50a
commit
8461949bed
1 changed files with 1 additions and 0 deletions
|
@ -40,6 +40,7 @@ class UserTeam < ApplicationRecord
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy(new_owner)
|
def destroy(new_owner)
|
||||||
|
return super() unless new_owner
|
||||||
# If any project of the team has the sole owner and that
|
# If any project of the team has the sole owner and that
|
||||||
# owner is the user to be removed from the team, then we must
|
# owner is the user to be removed from the team, then we must
|
||||||
# create a new owner of the project (the provided user).
|
# create a new owner of the project (the provided user).
|
||||||
|
|
Loading…
Add table
Reference in a new issue