👔 No longer return error when trying add a member who already in the realm
This commit is contained in:
parent
271e61510e
commit
a08372d4d2
@ -116,7 +116,7 @@ func AddRealmMember(user models.Account, affected models.Account, target models.
|
||||
AccountID: affected.ID,
|
||||
RealmID: target.ID,
|
||||
}).First(&member).Error; err == nil || !errors.Is(err, gorm.ErrRecordNotFound) {
|
||||
return fmt.Errorf("the user is already in the realm")
|
||||
return nil
|
||||
}
|
||||
|
||||
if !target.IsPublic && !target.IsCommunity {
|
||||
|
Loading…
x
Reference in New Issue
Block a user