From 756032af40dfc03ec7530b4a67f063975cf72e0c Mon Sep 17 00:00:00 2001 From: Bas Date: Tue, 10 Dec 2024 15:12:39 +0100 Subject: [PATCH] Fixes after manual testing Fix bugs after manual testing --- .../ApiBundle/Controller/RecoveryTokenController.php | 2 +- .../ApiBundle/Identity/Entity/AuditLogEntry.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RecoveryTokenController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RecoveryTokenController.php index 63972b87c..ace32e80f 100644 --- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RecoveryTokenController.php +++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RecoveryTokenController.php @@ -65,7 +65,7 @@ public function collection(Request $request): JsonCollectionResponse sprintf('Received search request for recovery tokens with params: %s', $request->getQueryString()), ); $query = new RecoveryTokenQuery(); - $query->identityId = new IdentityId($request->get('identityId')); + $query->identityId = $request->get('identityId') ? new IdentityId($request->get('identityId')) : null; $query->type = $request->get('type'); $query->status = $request->get('status'); $query->institution = $request->get('institution'); diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/AuditLogEntry.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/AuditLogEntry.php index f047a96f7..cbd110731 100644 --- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/AuditLogEntry.php +++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/AuditLogEntry.php @@ -169,7 +169,7 @@ public function jsonSerialize(): array return [ 'actor_id' => $this->actorId, 'actor_institution' => $this->actorInstitution instanceof Institution ? (string)$this->actorInstitution : null, - 'actor_common_name' => $this->actorCommonName, + 'actor_common_name' => (string)$this->actorCommonName, 'identity_id' => $this->identityId, 'identity_institution' => (string)$this->identityInstitution, 'ra_institution' => (string)$this->raInstitution,