fix: mv nomatchingentries

This commit is contained in:
dettlaff 2024-12-11 12:30:22 +04:00
parent 6d6583ced6
commit 924218b6aa

View file

@ -165,12 +165,13 @@ class KanidmUserRepository(AbstractUserRepository):
plugin_error = response_data.get("plugin", {})
if plugin_error.get("attrunique") == "duplicate value detected":
raise UserAlreadyExists # TODO only user ?
if isinstance(response_data, str):
if response_data == "nomatchingentries":
raise UserNotFound
raise KanidmQueryError(error_text=response.text)
if isinstance(response_data, str):
if response_data == "nomatchingentries":
raise UserNotFound
return response_data
@staticmethod