From ac7fee5d0e2aa8d8bb0ca57173996c3c8ae76c6d Mon Sep 17 00:00:00 2001 From: Stanislav Romanov Date: Sun, 13 Nov 2022 08:17:06 +0300 Subject: [PATCH] Add empty primary key in new document --- app/routes/admin/indexes/item/documents/new.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/routes/admin/indexes/item/documents/new.js b/app/routes/admin/indexes/item/documents/new.js index b86fd75..6d2ebd2 100644 --- a/app/routes/admin/indexes/item/documents/new.js +++ b/app/routes/admin/indexes/item/documents/new.js @@ -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 }); } }