Skip to content

Commit d1110c5

Browse files
committed
Query with taskIdentifier on the group page
1 parent d4d34c4 commit d1110c5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

apps/webapp/app/presenters/v3/ErrorGroupPresenter.server.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,9 @@ export class ErrorGroupPresenter extends BasePresenter {
130130
defaultPeriod: "7d",
131131
});
132132

133-
const [summary, affectedVersions, runList, stateRow] = await Promise.all([
134-
this.getSummary(organizationId, projectId, environmentId, fingerprint),
133+
const summary = await this.getSummary(organizationId, projectId, environmentId, fingerprint);
134+
135+
const [affectedVersions, runList, stateRow] = await Promise.all([
135136
this.getAffectedVersions(organizationId, projectId, environmentId, fingerprint),
136137
this.getRunList(organizationId, environmentId, {
137138
userId,
@@ -144,7 +145,7 @@ export class ErrorGroupPresenter extends BasePresenter {
144145
cursor,
145146
direction,
146147
}),
147-
this.getState(environmentId, fingerprint),
148+
this.getState(environmentId, summary?.taskIdentifier, fingerprint),
148149
]);
149150

150151
if (summary) {
@@ -323,11 +324,13 @@ export class ErrorGroupPresenter extends BasePresenter {
323324

324325
private async getState(
325326
environmentId: string,
327+
taskIdentifier: string | undefined,
326328
fingerprint: string
327329
): Promise<ErrorGroupState | null> {
328330
const row = await this.replica.errorGroupState.findFirst({
329331
where: {
330332
environmentId,
333+
...(taskIdentifier ? { taskIdentifier } : {}),
331334
errorFingerprint: fingerprint,
332335
},
333336
select: {

0 commit comments

Comments
 (0)