Skip to content

Commit fe7fe14

Browse files
committed
fix: fix GetOrganizationIDsByMemberIDs on database fake
1 parent e9e3369 commit fe7fe14

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

coderd/database/databasefake/databasefake.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,10 @@ func (q *fakeQuerier) GetOrganizationIDsByMemberIDs(_ context.Context, ids []uui
726726
OrganizationIDs: userOrganizationIDs,
727727
})
728728
}
729-
return getOrganizationIDsByMemberIDRows, sql.ErrNoRows
729+
if len(getOrganizationIDsByMemberIDRows) == 0 {
730+
return nil, sql.ErrNoRows
731+
}
732+
return getOrganizationIDsByMemberIDRows, nil
730733
}
731734

732735
func (q *fakeQuerier) GetProvisionerDaemons(_ context.Context) ([]database.ProvisionerDaemon, error) {

0 commit comments

Comments
 (0)