From 5d2b272665354b4f9be76a090e7cb7baf6431e88 Mon Sep 17 00:00:00 2001 From: Daniel Mursa Date: Thu, 19 Dec 2024 11:59:04 +0100 Subject: [PATCH] [#486] Update PrerequisiteFailed in ConfigurationRunFailed --- src/objects/setup_configuration/steps/token_auth.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/objects/setup_configuration/steps/token_auth.py b/src/objects/setup_configuration/steps/token_auth.py index 8e123718..1da9161c 100644 --- a/src/objects/setup_configuration/steps/token_auth.py +++ b/src/objects/setup_configuration/steps/token_auth.py @@ -54,7 +54,9 @@ def _configure_permissions(self, token: TokenAuth, permissions: list) -> None: "fields": permission.fields, } except ObjectDoesNotExist as exception: - raise PrerequisiteFailed(step=self, validation_error=exception) + raise ConfigurationRunFailed( + ("Object type with %s does not exist" % permission.object_type) + ) from exception permission_instance = Permission(**permission_kwargs) self._full_clean(permission_instance)