From 06fd2410ef63d394bd2227eac3e898b9718d03e4 Mon Sep 17 00:00:00 2001 From: Rostislav Raykov Date: Wed, 21 Feb 2024 11:31:40 +0100 Subject: [PATCH] fix: check for valid arguments in remove_filtered_policy --- src/adapter.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/adapter.rs b/src/adapter.rs index 81587d0..0b27d95 100644 --- a/src/adapter.rs +++ b/src/adapter.rs @@ -251,7 +251,7 @@ impl Adapter for SqlxAdapter { field_index: usize, field_values: Vec, ) -> Result { - if field_index <= 5 && !field_values.is_empty() && field_values.len() > field_index { + if field_index <= 5 && !field_values.is_empty() && field_values.len() + field_index <= 6 { adapter::remove_filtered_policy(&self.pool, pt, field_index, field_values).await } else { Ok(false)