Skip to content

Commit

Permalink
Fix deployment.concurrency_limit always null.
Browse files Browse the repository at this point in the history
  • Loading branch information
collincchoy committed Sep 19, 2024
1 parent e337ee0 commit 6fa1674
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/maps/deployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const mapDeploymentResponseToDeployment: MapFunction<DeploymentResponse,
can: createObjectLevelCan(),
status: this.map('ServerDeploymentStatus', source.status, 'DeploymentStatus'),
disabled: source.disabled ?? false,
concurrencyLimit: source.concurrency_limit,
concurrencyLimit: source.concurrency_limit ?? source.global_concurrency_limit?.limit ?? null,
})
}

Expand Down
2 changes: 2 additions & 0 deletions src/models/api/DeploymentResponse.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { ConcurrencyV2Response } from '@/models/api/ConcurrencyV2Response'
import { CreatedOrUpdatedByResponse } from '@/models/api/CreatedOrUpdatedByResponse'
import { DeploymentScheduleResponse } from '@/models/api/DeploymentScheduleResponse'
import { ScheduleResponse } from '@/models/api/ScheduleResponse'
Expand Down Expand Up @@ -36,4 +37,5 @@ export type DeploymentResponse = {
status: ServerDeploymentStatus,
disabled?: boolean,
concurrency_limit: number | null,
global_concurrency_limit: ConcurrencyV2Response | null,
}

0 comments on commit 6fa1674

Please sign in to comment.