Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9528ca2

Browse files
committed
fix a query
1 parent2b61d3f commit9528ca2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

‎coderd/database/modelqueries.go‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func (q *sqlQuerier) GetAuthorizedTemplates(ctx context.Context, arg GetTemplate
5454
pq.Array(arg.IDs),
5555
)
5656
iferr!=nil {
57-
returnnil,err
57+
returnnil,xerrors.Errorf("query context: %w",err)
5858
}
5959
deferrows.Close()
6060
varitems []Template
@@ -82,16 +82,17 @@ func (q *sqlQuerier) GetAuthorizedTemplates(ctx context.Context, arg GetTemplate
8282
&i.AllowUserAutostop,
8383
&i.FailureTTL,
8484
&i.InactivityTTL,
85+
&i.LockedTTL,
8586
);err!=nil {
86-
returnnil,err
87+
returnnil,xerrors.Errorf("scan: %w",err)
8788
}
8889
items=append(items,i)
8990
}
9091
iferr:=rows.Close();err!=nil {
91-
returnnil,err
92+
returnnil,xerrors.Errorf("close: %w",err)
9293
}
9394
iferr:=rows.Err();err!=nil {
94-
returnnil,err
95+
returnnil,xerrors.Errorf("rowserr: %w",err)
9596
}
9697
returnitems,nil
9798
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp