diff --git a/src/routes/production/getFlowData.ts b/src/routes/production/getFlowData.ts index 6a634b9..0df76f0 100644 --- a/src/routes/production/getFlowData.ts +++ b/src/routes/production/getFlowData.ts @@ -30,15 +30,17 @@ export default router.post( .select("o_assets.*", "o_image.filePath", "o_image.state", "o_image.errorReason") // @ts-ignore .where("o_assets.id", "in", assetIds) - .whereNull("o_assets.assetsId") + .andWhere("o_assets.assetsId", null) .where("o_assets.projectId", projectId); + console.log("%c Line:28 🎂 assetsData", "background:#6ec1c2", assetsData); + let childAssetsData = await u .db("o_assets") .leftJoin("o_image", "o_assets.imageId", "o_image.id") .select("o_assets.*", "o_image.filePath", "o_image.state", "o_image.errorReason") .where("o_assets.projectId", projectId) // @ts-ignore - .where("o_assets.id", "in", assetIds) + .where("o_assets.assetsId", "in", assetIds) .whereNotNull("o_assets.assetsId"); if (!sqlData) {