Skip to content

Commit

Permalink
fix(api): filter default group
Browse files Browse the repository at this point in the history
Signed-off-by: Yvonnick Esnault <yvonnick.esnault@corp.ovh.com>
  • Loading branch information
yesnault authored and richardlt committed Jan 17, 2020
1 parent 8fc4bac commit 91d9471
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion engine/api/notification/permission.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ func projectPermissionUsers(ctx context.Context, db gorp.SqlExecutor, projectID
AND "group".id <> $3
`

rows, err := db.Query(query, projectID, access, group.SharedInfraGroup.ID)
var defaultGroupID int64
if group.DefaultGroup != nil {
defaultGroupID = group.DefaultGroup.ID
}

rows, err := db.Query(query, projectID, access, defaultGroupID)
if err != nil {
if err == sql.ErrNoRows {
return users, nil
Expand Down

0 comments on commit 91d9471

Please sign in to comment.