Additional fix for GetMemberForBoard returning nil,nil (#3570)
* fix panic * remove else
This commit is contained in:
parent
cdcc50e075
commit
97818c3915
1 changed files with 3 additions and 2 deletions
|
@ -695,7 +695,7 @@ func (s *MattermostAuthLayer) GetMemberForBoard(boardID, userID string) (*model.
|
|||
if errors.As(memberErr, &appErr) && appErr.StatusCode == http.StatusNotFound {
|
||||
// Plugin API returns error if channel member doesn't exist.
|
||||
// We're fine if it doesn't exist, so its not an error for us.
|
||||
return nil, nil
|
||||
return nil, model.NewErrNotFound(userID)
|
||||
}
|
||||
|
||||
return nil, memberErr
|
||||
|
@ -712,7 +712,8 @@ func (s *MattermostAuthLayer) GetMemberForBoard(boardID, userID string) (*model.
|
|||
Synthetic: true,
|
||||
}, nil
|
||||
}
|
||||
} else {
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return bm, nil
|
||||
|
|
Loading…
Reference in a new issue