From f6b47d381b7dbac5d26db40c3243a1fb58a8cbba Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Wed, 6 Apr 2022 20:28:16 +0100 Subject: [PATCH] Ensure WHERE conditions are computed correctly --- lib/src/doc/check.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/doc/check.rs b/lib/src/doc/check.rs index 5cd96684..16d0b633 100644 --- a/lib/src/doc/check.rs +++ b/lib/src/doc/check.rs @@ -15,8 +15,8 @@ impl<'a> Document<'a> { ) -> Result<(), Error> { // Check where condition if let Some(cond) = stm.conds() { - if cond.expr.compute(ctx, opt, txn, Some(&self.current)).await?.is_truthy() { // Check if the expression is truthy + if !cond.expr.compute(ctx, opt, txn, Some(&self.current)).await?.is_truthy() { // Ignore this document return Err(Error::Ignore); }