Skip to content

Commit c0c5dd2

Browse files
committed
perf(webapp): also filter archived envs in the best-environment resolver
Extends the archivedAt: null filter to SelectBestEnvironmentPresenter's own project env loads so the project-root default redirect resolves consistently with the section routes and never lands on an archived (dead) preview branch.
1 parent bfb0d6a commit c0c5dd2

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

apps/webapp/app/presenters/SelectBestEnvironmentPresenter.server.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export class SelectBestEnvironmentPresenter {
4646
include: {
4747
organization: true,
4848
environments: {
49+
where: { archivedAt: null },
4950
select: {
5051
id: true,
5152
type: true,
@@ -71,6 +72,7 @@ export class SelectBestEnvironmentPresenter {
7172
include: {
7273
organization: true,
7374
environments: {
75+
where: { archivedAt: null },
7476
select: {
7577
id: true,
7678
type: true,

0 commit comments

Comments
 (0)