Skip to content

Commit 922affd

Browse files
authored
Merge pull request #27 from ConductorOne/bt/fix_user_page_prov
Skip optional fields and fields with default values when inserting into groups
2 parents 6232e25 + c83b330 commit 922affd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/client/group.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,8 @@ func (c *Client) CreateGroup(ctx context.Context, organizationID *int64, name st
291291

292292
args := []interface{}{name, organizationID}
293293

294-
if _, err := c.db.Exec(ctx, `INSERT INTO groups ("name", "organizationId", "createdAt", "updatedAt", "archivedAt", "usageAnalyticsAccess", "themeAccess", "unpublishedReleaseAccess", "accountDetailsAccess") VALUES ($1, $2,NOW(), NOW(), NULL, false, false, false, false)`, args...); err != nil {
294+
if _, err := c.db.Exec(ctx, `INSERT INTO groups ("name", "organizationId", "createdAt", "updatedAt")
295+
VALUES ($1, $2, NOW(), NOW())`, args...); err != nil {
295296
return err
296297
}
297298

0 commit comments

Comments
 (0)