diff --git a/src/Notion/Objects/Page.php b/src/Notion/Objects/Page.php index 028b1eb..306bf48 100644 --- a/src/Notion/Objects/Page.php +++ b/src/Notion/Objects/Page.php @@ -43,10 +43,13 @@ public function addBlock($block): self public function prepareForRequest() { $data = [ - 'parent' => $this->parent, 'properties' => [], ]; + if (null !== $this->parent) { + $data['parent'] = $this->parent; + } + foreach ($this->properties as $property) { $value = $property->get(); @@ -65,8 +68,6 @@ public function prepareForRequest() } } - ray($data); - return $data; }