diff --git a/lib/Controller/ApplicationsController.php b/lib/Controller/ApplicationsController.php index 502ac7e6..4f7ca1d4 100644 --- a/lib/Controller/ApplicationsController.php +++ b/lib/Controller/ApplicationsController.php @@ -1312,7 +1312,13 @@ private function lookupOne( ]; if ($owner !== null) { - $query['owner'] = $owner; + // OR records ownership under `@self.owner`, not at the + // top level. Placing the filter on the top-level `owner` + // field made every owner-scoped lookup miss (#51) — the + // slug-collision check then fell through and the org-wide + // register-slug unique constraint raised `clone_failed` + // instead of the documented `slug_collision`. + $query['@self']['owner'] = $owner; } $results = $this->objectService->searchObjects(query: $query);