Cant cancel an approved document

Hi, I’m encountering an issue when trying to cancel documents. I have a test doctype that doesn’t contain any document links field. When I attempt to cancel it, the app becomes unresponsive and remains grayed out.

Console error: 500 (INTERNAL SERVER ERROR)
image

Thank you

are you calling apply_workflow() on cancelling the doctype?

I don’t have apply_workflow() in the server script for any Doctype, only cancel on workflow is used.