diff --git a/server-plugins/process-resources/src/functions.ts b/server-plugins/process-resources/src/functions.ts index d4ae95ac34..e14b37d168 100644 --- a/server-plugins/process-resources/src/functions.ts +++ b/server-plugins/process-resources/src/functions.ts @@ -791,7 +791,9 @@ export async function CreateToDo ( const todoResults = results ?? [] if (params.askRequired === true) { const h = control.client.getHierarchy() - const classId = _process.masterTag + const card = control.cache.get(execution.card) + if (card === undefined) throw processError(process.error.ObjectNotFound, { _id: execution.card }) + const classId = h.isMixin(_process.masterTag) ? _process.masterTag : h.getBaseClass(card._class) const allAttributes = Array.from( h.isMixin(classId) ? h.getOwnAttributes(classId).values() : h.getAllAttributes(classId, core.class.Doc).values() )