diff --git a/ipa-server/ipa-gui/ipagui/helpers/ipahelper.py b/ipa-server/ipa-gui/ipagui/helpers/ipahelper.py index a33acc074..511e28daf 100644 --- a/ipa-server/ipa-gui/ipagui/helpers/ipahelper.py +++ b/ipa-server/ipa-gui/ipagui/helpers/ipahelper.py @@ -16,6 +16,7 @@ # import re +import logging def javascript_string_escape(input): """Escapes the ' " and \ characters in a string so @@ -50,8 +51,11 @@ def fix_incoming_fields(fields, fieldname, multifieldname): field, then removes the multiple field. """ fields[fieldname] = [] - for i in range(len(fields[multifieldname])): - fields[fieldname].append(fields[multifieldname][i][fieldname]) - del(fields[multifieldname]) + try: + for i in range(len(fields[multifieldname])): + fields[fieldname].append(fields[multifieldname][i][fieldname]) + del(fields[multifieldname]) + except Exception, e: + logging.warn("fix_incoming_fields error: " + str(e)) return fields diff --git a/ipa-server/ipa-gui/ipagui/subcontrollers/ipapolicy.py b/ipa-server/ipa-gui/ipagui/subcontrollers/ipapolicy.py index 8663098f1..1db062b40 100644 --- a/ipa-server/ipa-gui/ipagui/subcontrollers/ipapolicy.py +++ b/ipa-server/ipa-gui/ipagui/subcontrollers/ipapolicy.py @@ -163,12 +163,12 @@ class IPAPolicyController(IPAController): if new_ipapolicy.getValues('ipadefaultprimarygroup') != kw.get('ipadefaultprimarygroup'): policy_modified = True new_ipapolicy.setValue('ipadefaultprimarygroup', kw.get('ipadefaultprimarygroup')) - if new_ipapolicy.getValues('ipauserobjectclasses') != kw.get('ipauserobjectclasses'): - policy_modified = True - new_ipapolicy.setValue('ipauserobjectclasses', kw.get('ipauserobjectclasses')) - if new_ipapolicy.getValues('ipagroupobjectclasses') != kw.get('ipagroupobjectclasses'): - policy_modified = True - new_ipapolicy.setValue('ipagroupobjectclasses', kw.get('ipagroupobjectclasses')) +# if new_ipapolicy.getValues('ipauserobjectclasses') != kw.get('ipauserobjectclasses'): +# policy_modified = True +# new_ipapolicy.setValue('ipauserobjectclasses', kw.get('ipauserobjectclasses')) +# if new_ipapolicy.getValues('ipagroupobjectclasses') != kw.get('ipagroupobjectclasses'): +# policy_modified = True +# new_ipapolicy.setValue('ipagroupobjectclasses', kw.get('ipagroupobjectclasses')) if new_ipapolicy.getValues('ipadefaultemaildomain') != kw.get('ipadefaultemaildomain'): policy_modified = True new_ipapolicy.setValue('ipadefaultemaildomain', kw.get('ipadefaultemaildomain'))