From 7391f397988cd0553e4881f08ad09c804f73df55 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Wed, 26 Aug 2020 18:54:07 +0300 Subject: [PATCH] Fix for nested docs structure error #514 --- app/controllers/api/database.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/api/database.php b/app/controllers/api/database.php index eb1a750e7..548905eda 100644 --- a/app/controllers/api/database.php +++ b/app/controllers/api/database.php @@ -411,6 +411,7 @@ App::post('/v1/database/collections/:collectionId/documents') ->setAttribute($parentProperty, $data, $parentPropertyType); $data = $parentDocument->getArrayCopy(); + $collection = $projectDB->getDocument($parentDocument->getCollection(), false); } /**