diff --git a/module/Api/src/Domain/QueryHandler/Messaging/Conversations/ByApplicationToLicence.php b/module/Api/src/Domain/QueryHandler/Messaging/Conversations/ByApplicationToLicence.php index 2ec40b484c..9a7122419f 100644 --- a/module/Api/src/Domain/QueryHandler/Messaging/Conversations/ByApplicationToLicence.php +++ b/module/Api/src/Domain/QueryHandler/Messaging/Conversations/ByApplicationToLicence.php @@ -32,12 +32,7 @@ public function handleQuery(QueryInterface $query) 'licence' => $application->getLicence()->getId(), 'statuses' => $query->getStatuses(), ]; - $byLicence = $this->getQueryHandler()->handleQuery(GetConversationsByLicenceQuery::create($licenceQuery)); - array_walk( - $byLicence['result'], - fn(&$result) => $result['task']['application'] = $application->serialize(), - ); - return $byLicence; + return $this->getQueryHandler()->handleQuery(GetConversationsByLicenceQuery::create($licenceQuery)); } } diff --git a/test/module/Api/src/Domain/QueryHandler/Messaging/Conversations/ByApplicationToLicenceTest.php b/test/module/Api/src/Domain/QueryHandler/Messaging/Conversations/ByApplicationToLicenceTest.php index 8d27bf2bf3..2457835cd5 100644 --- a/test/module/Api/src/Domain/QueryHandler/Messaging/Conversations/ByApplicationToLicenceTest.php +++ b/test/module/Api/src/Domain/QueryHandler/Messaging/Conversations/ByApplicationToLicenceTest.php @@ -33,7 +33,6 @@ public function testHandleQuery() $mockLicence->shouldReceive('getId')->once()->andReturn(2); $mockApplication = m::mock(Application::class); $mockApplication->shouldReceive('getLicence')->once()->andReturn($mockLicence); - $mockApplication->shouldReceive('serialize')->once()->andReturn(['id' => 7]); $this->repoMap[Repository\Application::class]->shouldReceive('fetchById')->andReturn($mockApplication);