1
0
Fork 0

fixed the "attachements" string

"attachements" was throwing the error on model admin. fixed the issue with removing the extra "e" from the string.
This commit is contained in:
Mahmud Abdur Rahman 2024-04-16 23:06:16 +06:00 committed by GitHub
parent 5dc7c7d84a
commit 26cb103c3a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -62,7 +62,7 @@ class MessageAttachmentInline(admin.TabularInline):
class MessageAdmin(admin.ModelAdmin):
def get_queryset(self, *args, **kwargs):
return super().get_queryset(*args, **kwargs).annotate(num_attachments=Count('attachements'))
return super().get_queryset(*args, **kwargs).annotate(num_attachments=Count('attachments'))
def attachment_count(self, msg):
return msg.num_attachments