Skip to content

Commit

Permalink
fix group delete
Browse files Browse the repository at this point in the history
  • Loading branch information
zhu327 committed Dec 28, 2023
1 parent be4bc4a commit 25f539b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/database/dao/group_resource_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@ func (m *groupResourcePolicyManager) BulkDeleteByGroupPKsWithTx(
tx *sqlx.Tx,
groupPKs []int64,
) error {
if len(groupPKs) == 0 {
return nil
}

sql := `DELETE FROM rbac_group_resource_policy WHERE group_pk IN (?)`
return database.SqlxDeleteWithTx(tx, sql, groupPKs)
}
Expand Down

0 comments on commit 25f539b

Please sign in to comment.