Drop empty-input guards from batch loaders
ANY(@ids) with an empty array is valid in Postgres and CollectRows already yields an empty slice; the early nil assignments added noise without changing callers. Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Bryan FRIMIN <bryan@frimin.fr>
This commit is contained in:
@@ -307,12 +307,6 @@ func (a *PersonalAPIKeys) LoadByIDs(
|
||||
conn pg.Querier,
|
||||
apiKeyIDs []gid.GID,
|
||||
) error {
|
||||
if len(apiKeyIDs) == 0 {
|
||||
*a = nil
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
q := `
|
||||
SELECT
|
||||
id,
|
||||
|
||||
Reference in New Issue
Block a user