From d3faa22b7897f5d15fb537386862eb1cdaf4a38d Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Fri, 30 Sep 2022 17:26:22 +0200 Subject: [PATCH] Fixed usage of enum where the enum's value should be used --- module/Rest/src/Entity/ApiKey.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/Rest/src/Entity/ApiKey.php b/module/Rest/src/Entity/ApiKey.php index bcb173da..beb9e0f9 100644 --- a/module/Rest/src/Entity/ApiKey.php +++ b/module/Rest/src/Entity/ApiKey.php @@ -148,7 +148,7 @@ class ApiKey extends AbstractEntity if ($this->hasRole($role)) { /** @var ApiKeyRole $apiKeyRole */ - $apiKeyRole = $this->roles->get($role); + $apiKeyRole = $this->roles->get($role->value); $apiKeyRole->updateMeta($meta); } else { $apiKeyRole = new ApiKeyRole($roleDefinition->role, $roleDefinition->meta, $this);