Skip to content

Commit

Permalink
Merge pull request #120 from duckzland/typo_breaks_create_new_elements
Browse files Browse the repository at this point in the history
fix wrong placement of } causing failure to create new entries
  • Loading branch information
yassilah authored Dec 11, 2020
2 parents 054c1c4 + 4ff869c commit 0dd4d11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/NestedForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ protected function fillAttributeFromRequest(NovaRequest $request, $requestAttrib
{
if ($model->exists) {
$newRequest = NovaRequest::createFrom($request);
if (!$model->{$model->getKeyName() && $request->has($model->getKeyName())}) {
if (!$model->{$model->getKeyName()} && $request->has($model->getKeyName())) {
$model->{$model->getKeyName()} = $request->get($model->getKeyName());
}
$children = collect($newRequest->get($requestAttribute));
Expand Down

0 comments on commit 0dd4d11

Please sign in to comment.