Merge pull request #34 from kaermorchen/feature/add-primary-key-in-new-document

Add empty primary key in new document
This commit is contained in:
Stanislav Romanov 2022-11-13 08:20:00 +03:00 committed by GitHub
commit 5739d73f1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,10 +8,8 @@ export default class AdminIndexesItemDocumentsNewRoute extends Route {
model() {
const index = this.modelFor('admin.indexes.item');
const document = new Document({ [index.primaryKey]: '' });
return hash({
index,
document: new Document(),
});
return hash({ index, document });
}
}