Skip to content

Commit fe51f38

Browse files
committed
fix(webapp): use relation connect for inherited branch region
Prisma's checked create input rejects a raw FK scalar alongside relation connects; use defaultWorkerGroup.connect instead.
1 parent f25808f commit fe51f38

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

apps/webapp/app/services/upsertBranch.server.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ export class UpsertBranchService {
120120
shortcode,
121121
maximumConcurrencyLimit: parentEnvironment.maximumConcurrencyLimit,
122122
// Inherit the region from the parent preview environment.
123-
defaultWorkerGroupId: parentEnvironment.defaultWorkerGroupId,
123+
defaultWorkerGroup: parentEnvironment.defaultWorkerGroupId
124+
? { connect: { id: parentEnvironment.defaultWorkerGroupId } }
125+
: undefined,
124126
organization: {
125127
connect: {
126128
id: parentEnvironment.organization.id,

0 commit comments

Comments
 (0)