diff --git a/selfprivacy_api/repositories/users/kanidm_user_repository.py b/selfprivacy_api/repositories/users/kanidm_user_repository.py index 498648f..7a76872 100644 --- a/selfprivacy_api/repositories/users/kanidm_user_repository.py +++ b/selfprivacy_api/repositories/users/kanidm_user_repository.py @@ -155,7 +155,7 @@ class KanidmUserRepository(AbstractUserRepository): response = response.json() - if response.get("plugin"): + if response["plugin"]: if response["plugin"].get("attrunique") == "duplicate value detected": raise UserAlreadyExists # TODO only user? @@ -165,6 +165,7 @@ class KanidmUserRepository(AbstractUserRepository): raise KanidmQueryError(f"Kanidm request failed! Error: {str(error)}") # {"plugin": {"attrunique": "duplicate value detected"}} + # nomatchingentries @staticmethod def create_user(