coddingtonbear / django-mailbox

Import mail from POP3, IMAP, local email mailboxes or directly from Postfix or Exim4 into your Django application automatically.
MIT License
356 stars 164 forks source link

FieldError at /django-admin/django_mailbox/message/ on latest release. #287

Closed xeroticikot closed 5 months ago

xeroticikot commented 5 months ago

Just installed the latest release with latest django version. Getting the following error on the django admin -

FieldError at /django-admin/django_mailbox/message/

Cannot resolve keyword 'attachements' into field. Choices are: attachments, body, eml, encoded, from_header, id, in_reply_to, in_reply_to_id, mailbox, mailbox_id, message_id, outgoing, processed, read, replies, subject, to_header

I believe the following line's causing the error -

class MessageAdmin(admin.ModelAdmin):
    def get_queryset(self, *args, **kwargs):
        return super().get_queryset(*args, **kwargs).annotate(num_attachments=Count('attachements'))

attachements should be attachments.

Pietro395 commented 5 months ago

Fixed on #288

Pietro395 commented 4 months ago

@xeroticikot version 4.10.1 has been released