You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -71,9 +73,12 @@ public function resolve($value, array $args, ResolveInfo $info)
71
73
if ($this->template->noParents === -1 && !$pages->get("template={$this->template}") instanceof NullPage) thrownewValidationException("Only one page with template `{$this->template->name}` can be created.");
if (count($parentTemplates) && !in_array($parent->template->id, $parentTemplates)) thrownewValidationException("`parent` is not allowed as a parent.");
@@ -114,7 +119,7 @@ public function resolve($value, array $args, ResolveInfo $info)
114
119
}
115
120
116
121
// save the page to db
117
-
if ($p->save()) return$p;
122
+
if ($p->save()) return$pages->get("$p");
118
123
119
124
// If we did not return till now then no good!
120
125
thrownewResolveException("Could not create page `$name` with template `{$this->template->name}`");
0 commit comments