Fix issue with schema generation when datasource is undefined
This commit is contained in:
parent
e8d5d54f5d
commit
c858b9341f
1 changed files with 7 additions and 5 deletions
|
@ -536,12 +536,14 @@ export const getSchemaForDatasource = (asset, datasource, options) => {
|
|||
}
|
||||
|
||||
// Add schema properties if required
|
||||
if (schema) {
|
||||
if (addId) {
|
||||
schema["_id"] = { type: "string" }
|
||||
}
|
||||
if (addRev) {
|
||||
schema["_rev"] = { type: "string" }
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure there are "name" properties for all fields and that field schema
|
||||
// are objects
|
||||
|
|
Loading…
Reference in a new issue