We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fcfaf2b commit 8610332Copy full SHA for 8610332
src/app/Library/CrudPanel/Traits/Create.php
@@ -219,7 +219,7 @@ private function getRelationDataFromFormData($data)
219
foreach ($relation_fields as $relation_field) {
220
$attributeKey = $this->parseRelationFieldNamesFromHtml([$relation_field])[0]['name'];
221
222
- if (isset($relation_field['pivot']) && $relation_field['pivot'] !== true) {
+ if (! is_null(Arr::get($data, $attributeKey)) && isset($relation_field['pivot']) && $relation_field['pivot'] !== true) {
223
$key = implode('.relations.', explode('.', $this->getOnlyRelationEntity($relation_field)));
224
$fieldData = Arr::get($relationData, 'relations.'.$key, []);
225
if (! array_key_exists('model', $fieldData)) {
0 commit comments