fix builder save
This commit is contained in:
@@ -3006,26 +3006,28 @@ export default {
|
|||||||
this.save()
|
this.save()
|
||||||
},
|
},
|
||||||
rebuildVariablesSchema ({ disable = true } = {}) {
|
rebuildVariablesSchema ({ disable = true } = {}) {
|
||||||
const parsed = {}
|
|
||||||
|
|
||||||
const dynamicDocumentRef = this.documentRefs.find((e) => e.isDynamic)
|
const dynamicDocumentRef = this.documentRefs.find((e) => e.isDynamic)
|
||||||
|
|
||||||
this.documentRefs.forEach((ref) => {
|
if (dynamicDocumentRef) {
|
||||||
if (ref.isDynamic) {
|
const parsed = {}
|
||||||
ref.updateVariablesSchema()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
this.dynamicDocuments.forEach((doc) => {
|
this.documentRefs.forEach((ref) => {
|
||||||
if (doc.variables_schema) {
|
if (ref.isDynamic) {
|
||||||
dynamicDocumentRef.mergeSchemaProperties(parsed, doc.variables_schema)
|
ref.updateVariablesSchema()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
if (!this.template.variables_schema) {
|
this.dynamicDocuments.forEach((doc) => {
|
||||||
this.template.variables_schema = parsed
|
if (doc.variables_schema) {
|
||||||
} else {
|
dynamicDocumentRef.mergeSchemaProperties(parsed, doc.variables_schema)
|
||||||
dynamicDocumentRef.syncVariablesSchema(this.template.variables_schema, parsed, { disable })
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
if (!this.template.variables_schema) {
|
||||||
|
this.template.variables_schema = parsed
|
||||||
|
} else {
|
||||||
|
dynamicDocumentRef.syncVariablesSchema(this.template.variables_schema, parsed, { disable })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user