diff --git a/casbin_pymongo_adapter/adapter.py b/casbin_pymongo_adapter/adapter.py index b7e23f7..1accc2d 100644 --- a/casbin_pymongo_adapter/adapter.py +++ b/casbin_pymongo_adapter/adapter.py @@ -165,7 +165,9 @@ def remove_filtered_policy(self, sec, ptype, field_index, *field_values): if not (1 <= field_index + len(field_values) <= 6): return False query = { - f"v{index + field_index}": value for index, value in enumerate(field_values) if value != "" + f"v{index + field_index}": value + for index, value in enumerate(field_values) + if value != "" } query["ptype"] = ptype results = self._collection.delete_many(query)