Browse Source

Fix issue with schema generation when datasource is undefined

master
Andrew Kingston 5 years ago
parent
commit
953c6b13bf
  1. 12
      packages/builder/src/builderStore/dataBinding.js

12
packages/builder/src/builderStore/dataBinding.js

@ -536,11 +536,13 @@ export const getSchemaForDatasource = (asset, datasource, options) => {
} }
// Add schema properties if required // Add schema properties if required
if (addId) { if (schema) {
schema["_id"] = { type: "string" } if (addId) {
} schema["_id"] = { type: "string" }
if (addRev) { }
schema["_rev"] = { type: "string" } if (addRev) {
schema["_rev"] = { type: "string" }
}
} }
// Ensure there are "name" properties for all fields and that field schema // Ensure there are "name" properties for all fields and that field schema

Loading…
Cancel
Save