mirror of
https://github.com/hcengineering/platform.git
synced 2026-08-17 18:05:42 +02:00
fix: handle missing card in CreateToDo function (#10952)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
@@ -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()
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user