From bd92505bc2c5ad0b0be8aee65b4c3d81e9e51ac6 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 3 Jul 2021 21:52:28 +0200 Subject: [PATCH] core: add notice about duplicate keys Signed-off-by: Jens Langhammer --- authentik/core/api/utils.py | 2 +- authentik/outposts/api/outposts.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/authentik/core/api/utils.py b/authentik/core/api/utils.py index 380208e08..f768bb812 100644 --- a/authentik/core/api/utils.py +++ b/authentik/core/api/utils.py @@ -14,7 +14,7 @@ def is_dict(value: Any): """Ensure a value is a dictionary, useful for JSONFields""" if isinstance(value, dict): return - raise ValidationError("Value must be a dictionary.") + raise ValidationError("Value must be a dictionary, and not have any duplicate keys.") class PassiveSerializer(Serializer): diff --git a/authentik/outposts/api/outposts.py b/authentik/outposts/api/outposts.py index 4cf47d907..7e6972171 100644 --- a/authentik/outposts/api/outposts.py +++ b/authentik/outposts/api/outposts.py @@ -51,7 +51,7 @@ class OutpostSerializer(ModelSerializer): raise ValidationError( ( f"Outpost type {self.initial_data['type']} can't be used with " - f"{type(provider)} providers." + f"{provider.__class__.__name} providers." ) ) return providers