diff --git a/tests/test_permissions.py b/tests/test_permissions.py
index 18687b7995fd55431255225c9e0bb0009c8b5447..423355976c868d901e19a088d5d79333b859657b 100644
--- a/tests/test_permissions.py
+++ b/tests/test_permissions.py
@@ -1210,7 +1210,7 @@ def test_check_entity_acl_roles():
     with raises(db.TransactionError) as cm:
         grant_permission(p, "USE:AS_PARENT", username="asdf-non-existing",
                          switch=False)
-    errors = cm.value.entity.errors
+    errors = cm.value.entities[0].errors
     assert errors[0].description == "User Role does not exist."
     db.administration.set_server_property(
         "CHECK_ENTITY_ACL_ROLES_MODE", "SHOULD")