mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 13:39:24 +08:00
fix(plugin-workflow): fix non-existed field in collection trigger cause error (#5318)
This commit is contained in:
parent
d335ffee7f
commit
2f57076d00
@ -59,9 +59,10 @@ async function handler(this: CollectionTrigger, workflow: WorkflowModel, data: M
|
||||
changed &&
|
||||
changed.length &&
|
||||
changed
|
||||
.filter(
|
||||
(name) => !['linkTo', 'hasOne', 'hasMany', 'belongsToMany'].includes(collection.getField(name).options.type),
|
||||
)
|
||||
.filter((name) => {
|
||||
const field = collection.getField(name);
|
||||
return field && !['linkTo', 'hasOne', 'hasMany', 'belongsToMany'].includes(field.options.type);
|
||||
})
|
||||
.every((name) => !data.changedWithAssociations(getFieldRawName(collection, name)))
|
||||
) {
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user