diff --git a/casbin_databases_adapter/adapter.py b/casbin_databases_adapter/adapter.py index 98cde2b..63ae156 100644 --- a/casbin_databases_adapter/adapter.py +++ b/casbin_databases_adapter/adapter.py @@ -71,7 +71,7 @@ async def remove_filtered_policy(self, sec, ptype, field_index, *field_values): return False for i, value in enumerate(field_values): if len(value) > 0: - query = query.where(self.table.columns[f"v{field_index+1}"] == value) + query = query.where(self.table.columns[f"v{field_index+i}"] == value) result = await self.db.execute(query) return True if result else False