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 Apr 27, 2023
1 parent b64e0b0 commit c218865
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions simple_history/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django.conf import settings
from django.contrib import admin
from django.contrib.admin import helpers
from django.contrib.admin.utils import unquote, quote
from django.contrib.admin.utils import quote, unquote
from django.contrib.admin.views.main import ChangeList
from django.contrib.auth import get_permission_codename
from django.core.exceptions import PermissionDenied
Expand Down Expand Up @@ -312,13 +312,11 @@ class SimpleHistoryShowDeletedFilter(admin.SimpleListFilter):
parameter_name = "entries"

def lookups(self, request, model_admin):
return (
("deleted_only", "Only Deleted"),
)
return (("deleted_only", "Only Deleted"),)

def queryset(self, request, queryset):
if self.value():
return queryset.model.history.filter(history_type='-').latest_of_each()
return queryset.model.history.filter(history_type="-").latest_of_each()
return queryset


Expand Down

0 comments on commit c218865

Please sign in to comment.