wagtail icon indicating copy to clipboard operation
wagtail copied to clipboard

Fix: Updated can_handle method to check for AbstractGroupApprovalTask in mail.py file

Open sumana-2705 opened this issue 1 year ago • 4 comments

This PR fixes issue #12328 by updating the BaseGroupApprovalTaskStateEmailNotifier to check for AbstractGroupApprovalTask instances. This allows custom tasks derived from AbstractGroupApprovalTask to be handled correctly.

Changes:

  • Imported AbstractGroupApprovalTask from wagtail.models.
  • Updated the can_handle method to check for AbstractGroupApprovalTask instead of GroupApprovalTask.

sumana-2705 avatar Oct 03 '24 12:10 sumana-2705

Manage this branch in Squash

Test this branch here: https://sumana-2705fix-can-handle-meth-wpaj5.squash.io

squash-labs[bot] avatar Oct 03 '24 12:10 squash-labs[bot]

Hello @lb- @laymonage @zerolab

I am reaching out to follow up on this pull request, I would like to inquire if there are any issues or concerns that need to be addressed in the pull request. If there are any mistakes or areas for improvement, I am more than willing to make the necessary corrections.

sumana-2705 avatar Oct 13 '24 11:10 sumana-2705

@sumana-2705 can you please look at adding unit tests?

lb- avatar Oct 13 '24 19:10 lb-

@lb- Could you please provide me with references or guidance on how to write unit tests for this bug? I'm finding it a bit challenging since I haven't had much experience with unit testing before. Thank you!

sumana-2705 avatar Oct 15 '24 13:10 sumana-2705

Cherry picked to 6.3 df441424f1afd07ddb7040e428bcf7d710706fe8

lb- avatar Oct 21 '24 22:10 lb-