mirror of
https://github.com/coder/coder.git
synced 2025-07-23 21:32:07 +00:00
fix: do not query user_link for deleted accounts (#12112)
This commit is contained in:
@ -3787,6 +3787,10 @@ func (q *FakeQuerier) GetUserLinkByLinkedID(_ context.Context, id string) (datab
|
||||
defer q.mutex.RUnlock()
|
||||
|
||||
for _, link := range q.userLinks {
|
||||
user, err := q.getUserByIDNoLock(link.UserID)
|
||||
if err == nil && user.Deleted {
|
||||
continue
|
||||
}
|
||||
if link.LinkedID == id {
|
||||
return link, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user