summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/otptoken.py
diff options
context:
space:
mode:
Diffstat (limited to 'ipalib/plugins/otptoken.py')
-rw-r--r--ipalib/plugins/otptoken.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/ipalib/plugins/otptoken.py b/ipalib/plugins/otptoken.py
index 77366bafe..f48feeee0 100644
--- a/ipalib/plugins/otptoken.py
+++ b/ipalib/plugins/otptoken.py
@@ -100,8 +100,11 @@ def _convert_owner(userobj, entry_attrs, options):
def _normalize_owner(userobj, entry_attrs):
owner = entry_attrs.get('ipatokenowner', None)
- if owner is not None:
- entry_attrs['ipatokenowner'] = userobj.get_dn(owner)
+ if owner:
+ try:
+ entry_attrs['ipatokenowner'] = userobj._normalize_manager(owner)[0]
+ except NotFound:
+ userobj.handle_not_found(owner)
def _check_interval(not_before, not_after):
if not_before and not_after: