From 3057d80e768bdf4d442b211386d40066506e25d5 Mon Sep 17 00:00:00 2001 From: pablone Date: Tue, 26 Nov 2024 09:14:38 +0100 Subject: [PATCH] fix: refs #8087 correct SQL join condition in entry_beforeUpdate trigger --- db/routines/vn/triggers/entry_beforeUpdate.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/routines/vn/triggers/entry_beforeUpdate.sql b/db/routines/vn/triggers/entry_beforeUpdate.sql index 66b36a861..059548789 100644 --- a/db/routines/vn/triggers/entry_beforeUpdate.sql +++ b/db/routines/vn/triggers/entry_beforeUpdate.sql @@ -41,7 +41,7 @@ BEGIN SELECT isRaid INTO vIsRaid FROM travel t JOIN entry e ON e.travelFk = t.id - WHERE t.entryFk = NEW.id; + WHERE e.id = NEW.id; SELECT NOT (o.warehouseInFk <=> n.warehouseInFk) OR NOT (o.warehouseOutFk <=> n.warehouseOutFk)