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);