Skip to content

Commit

Permalink
Fix paste into for manuel sorting in child tables
Browse files Browse the repository at this point in the history
  • Loading branch information
zonky2 committed Oct 4, 2024
1 parent 9fe6fbd commit 0e3cd16
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,8 @@ private function checkForModel(ModelInterface $containedModel, string $action):
if ($this->hasVariants()) {
$this->checkModelWithVariants($containedModel);
}
$this->checkModelWithoutVariants($containedModel);
$this->checkModelWithoutVariants($containedModel, $action);

return;
}

Expand Down Expand Up @@ -370,11 +371,20 @@ private function checkModelWithVariants(ModelInterface $containedModel): void
* Check the PA and PI with a model and a normal flat build.
*
* @param ModelInterface $containedModel The model to check.
* @param string $action The action to be checked.
*
* @return void
*/
private function checkModelWithoutVariants(ModelInterface $containedModel): void
private function checkModelWithoutVariants(ModelInterface $containedModel, string $action): void
{
// A copy can always be inserted after itself or into itself.
if ('copy' === $action) {
$this->disablePA = false;
$this->disablePI = false;

return;
}

$environment = $this->environment;
assert($environment instanceof EnvironmentInterface);
$dataDefinition = $environment->getDataDefinition();
Expand Down

0 comments on commit 0e3cd16

Please sign in to comment.