mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 06:35:20 +00:00
fix: create tree collection field (#4321)
This commit is contained in:
parent
5f5d3f3d90
commit
31b410dd69
@ -76,7 +76,7 @@ export class TreeCollectionTemplate extends CollectionTemplate {
|
||||
beforeSubmit(values) {
|
||||
if (Array.isArray(values?.fields)) {
|
||||
values?.fields.map((f) => {
|
||||
if (!f.target) {
|
||||
if (!f.target && ['belongsToMany', 'belongsTo', 'hasMany', 'hasOne'].includes(f.type)) {
|
||||
f.target = values.name;
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user