mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 19:36:22 +00:00
fix: efectivamente ignorar mails que ya son usuaries de este sitio
This commit is contained in:
parent
92fa2b8932
commit
362e45b51d
1 changed files with 2 additions and 2 deletions
|
@ -84,11 +84,11 @@ class UsuariesController < ApplicationController
|
|||
invitaciones.each do |invitacion|
|
||||
attributes = { email: invitacion.address }
|
||||
|
||||
next if Usuarie.where(id: @site.roles.pluck(:usuarie_id)).find_by(attributes)
|
||||
|
||||
usuarie = Usuarie.find_by attributes
|
||||
usuarie ||= Usuarie.invite! attributes
|
||||
|
||||
next if usuarie.sites.exists? @site.id
|
||||
|
||||
@site.roles.create(usuarie: usuarie, temporal: true, rol: invited_as)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue