diff options
author | Rob Crittenden <rcritten@redhat.com> | 2007-11-09 14:01:28 -0500 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2007-11-09 14:01:28 -0500 |
commit | b7506a5ea68a694932053a75ca9287dfb4fb1516 (patch) | |
tree | 881716b61aa711b2bb51ba8ff1ec31bcc99a9467 /ipa-server/ipa-gui | |
parent | 705d68ddcb3dfb98e7ce9a0ef4c9397977ab3f53 (diff) | |
download | freeipa-b7506a5ea68a694932053a75ca9287dfb4fb1516.tar.gz freeipa-b7506a5ea68a694932053a75ca9287dfb4fb1516.tar.xz freeipa-b7506a5ea68a694932053a75ca9287dfb4fb1516.zip |
Fix editing groups when cn is a single-valued field
Fix some error messages that were printing the entire detail message
Diffstat (limited to 'ipa-server/ipa-gui')
-rw-r--r-- | ipa-server/ipa-gui/ipagui/subcontrollers/group.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ipa-server/ipa-gui/ipagui/subcontrollers/group.py b/ipa-server/ipa-gui/ipagui/subcontrollers/group.py index 8ea87641e..bcc3e1ccd 100644 --- a/ipa-server/ipa-gui/ipagui/subcontrollers/group.py +++ b/ipa-server/ipa-gui/ipagui/subcontrollers/group.py @@ -81,7 +81,7 @@ class GroupController(IPAController): return dict(form=group_new_form, group=kw, tg_template='ipagui.templates.groupnew') except ipaerror.IPAError, e: - turbogears.flash("Group add failed: " + str(e) + "<br/>" + str(e.detail)) + turbogears.flash("Group add failed: " + str(e) + "<br/>" + e.detail[0]['desc']) return dict(form=group_new_form, group=kw, tg_template='ipagui.templates.groupnew') @@ -90,6 +90,8 @@ class GroupController(IPAController): # on any error, we redirect to the _edit_ group page. # this code does data setup, similar to groupedit() # + if isinstance(kw['cn'], str): + kw['cn'] = [kw['cn']] group = client.get_entry_by_cn(kw['cn'][0], group_fields) group_dict = group.toDict() member_dicts = [] @@ -403,7 +405,7 @@ class GroupController(IPAController): turbogears.flash("group deleted") raise turbogears.redirect('/group/list') except (SyntaxError, ipaerror.IPAError), e: - turbogears.flash("Group deletion failed: " + str(e) + "<br/>" + str(e.detail)) + turbogears.flash("Group deletion failed: " + str(e) + "<br/>" + e.detail[0]['desc']) raise turbogears.redirect('/group/list') @validate(form=group_new_form) |