Skip to content

Commit e93a16d

Browse files
committed
fix(webapp): honor the caller's prisma client in the latest-deployment fallback
findCurrentWorkerDeployment resolved the caller-supplied client for the promotion read but used the module-level client for the fallback read, so callers passing a replica silently read the primary for that one query.
1 parent dc20f17 commit e93a16d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/webapp/app/v3/models/workerDeployment.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export async function findCurrentWorkerDeployment({
128128
}
129129

130130
// We need to get the latest deployment of the given type
131-
const latestDeployment = await prisma.workerDeployment.findFirst({
131+
const latestDeployment = await $prisma.workerDeployment.findFirst({
132132
where: {
133133
environmentId,
134134
type,

0 commit comments

Comments
 (0)