Skip to content

Commit

Permalink
fix: check for valid arguments in remove_filtered_policy
Browse files Browse the repository at this point in the history
  • Loading branch information
zbrox committed Feb 21, 2024
1 parent e533c26 commit 06fd241
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ impl Adapter for SqlxAdapter {
field_index: usize,
field_values: Vec<String>,
) -> Result<bool> {
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)
Expand Down

0 comments on commit 06fd241

Please sign in to comment.