File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -351,16 +351,14 @@ public function setInputValue(string $value): void
351351 }
352352 }
353353
354- $ ourEntity = $ this ->entityField ->getField ()->hasReference ()
355- ? $ this ->entityField ->getEntity ()
356- : $ this ->form ->entity ;
357- $ theirReference = $ this ->entityField ->getField ()->hasReference ()
358- ? $ this ->entityField ->getField ()->getReference ()
359- : new \Atk4 \Data \Reference ('x ' ); // TODO
354+ $ this ->changes = $ changes ;
360355
361- $ changes ->saveOnSave ($ ourEntity , $ theirReference );
356+ if ($ this ->entityField ->getField ()->hasReference ()) {
357+ $ ourEntity = $ this ->entityField ->getEntity ();
358+ $ theirReference = $ this ->entityField ->getField ()->getReference ();
362359
363- $ this ->changes = $ changes ;
360+ $ changes ->saveOnSave ($ ourEntity , $ theirReference );
361+ }
364362 }
365363
366364 /**
You can’t perform that action at this time.
0 commit comments