Skip to content

Commit

Permalink
Improve formatting for has_delete_permission, typespec.
Browse files Browse the repository at this point in the history
  • Loading branch information
jchristgit committed Oct 11, 2019
1 parent a185a25 commit 879d807
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pydis_site/apps/api/admin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from typing import Optional

from django.contrib import admin
from django.http import HttpRequest

from .models import (
BotSetting,
Expand Down Expand Up @@ -37,7 +40,11 @@ class LogEntryAdmin(admin.ModelAdmin):
'message'
)

def has_delete_permission(self, request, obj=None) -> bool:
def has_delete_permission(
self,
request: HttpRequest,
obj: Optional[LogEntry] = None
) -> bool:
"""Deny LogEntry deletion."""
return False

Expand Down

0 comments on commit 879d807

Please sign in to comment.