Skip to content

Commit 4f89642

Browse files
committed
Fix empty db lookup
1 parent 38abbb5 commit 4f89642

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

coderd/database/databasefake/databasefake.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -419,9 +419,6 @@ func (q *fakeQuerier) GetWorkspaceAppsByAgentIDs(_ context.Context, ids []uuid.U
419419
}
420420
}
421421
}
422-
if len(apps) == 0 {
423-
return nil, sql.ErrNoRows
424-
}
425422
return apps, nil
426423
}
427424

coderd/workspaceresources.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ func (api *API) workspaceResource(rw http.ResponseWriter, r *http.Request) {
5151
agentIDs = append(agentIDs, agent.ID)
5252
}
5353
apps, err := api.Database.GetWorkspaceAppsByAgentIDs(r.Context(), agentIDs)
54-
if errors.Is(err, sql.ErrNoRows) {
55-
err = nil
56-
}
5754
if err != nil {
5855
httpapi.Write(rw, http.StatusInternalServerError, httpapi.Response{
5956
Message: fmt.Sprintf("get workspace apps: %s", err),

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy