Skip to content

Commit

Permalink
Update adapter.py
Browse files Browse the repository at this point in the history
fix format
  • Loading branch information
sanguinedab authored Oct 23, 2024
1 parent 56f4f33 commit 24443b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion casbin_pymongo_adapter/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 24443b9

Please sign in to comment.