Skip to content

Commit

Permalink
Fix for Django 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ruscoder committed Oct 8, 2018
1 parent bf83ea5 commit 217a73c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dbmail/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class MailLogEmailInline(admin.TabularInline):
model = MailLogEmail
extra = 0

def has_add_permission(self, request):
def has_add_permission(self, request, obj=None):
return False

def has_delete_permission(self, request, obj=None):
Expand Down Expand Up @@ -222,7 +222,7 @@ def __init__(self, model, admin_site):
self.readonly_fields = [field.name for field in model._meta.fields]
self.readonly_model = model

def has_add_permission(self, request):
def has_add_permission(self, request, obj=None):
return False

def has_delete_permission(self, request, obj=None):
Expand Down Expand Up @@ -325,7 +325,7 @@ def __init__(self, model, admin_site):
self.readonly_fields = [field.name for field in model._meta.fields]
self.readonly_model = model

def has_add_permission(self, request):
def has_add_permission(self, request, obj=None):
return False

def has_delete_permission(self, request, obj=None):
Expand Down Expand Up @@ -362,7 +362,7 @@ class MailLogExceptionAdmin(admin.ModelAdmin):
search_fields = ('name',)
readonly_fields = ('name',)

def has_add_permission(self, request):
def has_add_permission(self, request, obj=None):
return False

def has_delete_permission(self, request, obj=None):
Expand Down

0 comments on commit 217a73c

Please sign in to comment.