Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 15, 2024
1 parent 7c9f6d7 commit 89c37e6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions taggit/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ def remove_orphaned_tags_action(self, request, queryset):
try:
orphaned_tags = Tag.objects.filter(taggit_taggeditem_items=None)
count, _ = orphaned_tags.delete()
self.message_user(request, f"Successfully removed {count} orphaned tags.", level="success")
self.message_user(
request, f"Successfully removed {count} orphaned tags.", level="success"
)
except Exception as e:
self.message_user(request, f"An error occurred: {e}", level="error")
self.message_user(request, f"An error occurred: {e}", level="error")

0 comments on commit 89c37e6

Please sign in to comment.