You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found a bug? Please fill out the sections below. 👍
Issue Summary
Currently, if you create a revision using page.save_revision(submitted_for_moderation=True) and then attempt to accept the page in the moderation queue, a server error occurs. This is caused by the send_moderation_notifications method in wagtail.admin.mail creating a list with a none object rather than an empty list when there is no user on a revision.
@jlchilders11 if you get time to make the change we discussed, about handling None authors correctly, I can help shepherd it through and probably get it pushed out in the next patch, since it's a minimal change.
I think rather than using AnonymousUser (our temporary workaround), it would be better to just have an empty list [] and then skip over sending the notifications entirely in that case.
Another option would be to force revisions to have a valid user, which I think would be a much more disruptive change.
yvess
added a commit
to yvess/wagtail
that referenced
this issue
Jun 15, 2022
Found a bug? Please fill out the sections below. 👍
Issue Summary
Currently, if you create a revision using
page.save_revision(submitted_for_moderation=True)
and then attempt to accept the page in the moderation queue, a server error occurs. This is caused by thesend_moderation_notifications
method inwagtail.admin.mail
creating a list with a none object rather than an empty list when there is no user on a revision.Steps to Reproduce
wagtail start myproject
page.save_revision(submitted_for_moderation=True)
python manage.py runserver
and loginAny other relevant information. For example, why do you consider this a bug and what did you expect to happen instead?
yes/ no)Technical details
The text was updated successfully, but these errors were encountered: