Skip to content

Commit 7e10016

Browse files
committed
Fix
1 parent 356b47d commit 7e10016

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/sim/lib/uploads/contexts/workspace/workspace-file-manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ export async function trackChatUpload(
225225
const updated = await db
226226
.update(workspaceFiles)
227227
.set({ chatId, context: 'mothership' })
228-
.where(and(eq(workspaceFiles.key, s3Key), isNull(workspaceFiles.deletedAt)))
228+
.where(and(eq(workspaceFiles.key, s3Key), eq(workspaceFiles.workspaceId, workspaceId), isNull(workspaceFiles.deletedAt)))
229229
.returning({ id: workspaceFiles.id })
230230

231231
if (updated.length > 0) {

0 commit comments

Comments
 (0)