summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
authorPavel Zuna <pzuna@redhat.com>2010-08-17 14:53:03 -0400
committerAdam Young <ayoung@redhat.com>2010-08-17 14:53:03 -0400
commit7a007d958b502df0aa94f03489db54680bdac655 (patch)
treef8947ebd31461ea97ebf4917866c8c38bea5d066 /ipalib
parent19466d499ba853c51f0e87bbbb1484fdee71509f (diff)
downloadfreeipa-7a007d958b502df0aa94f03489db54680bdac655.tar.gz
freeipa-7a007d958b502df0aa94f03489db54680bdac655.tar.xz
freeipa-7a007d958b502df0aa94f03489db54680bdac655.zip
Fix Update function on details page.
The problem was that parameters with no values are automatically set to None by the framework and it wasn't handled properly in baseldap.py:get_attributes function. Also, there were two logical bugs in details.js: 1) atttribute callback to update values were called for input elements instead of dt elements 2) it was always trying to update the primary key
Diffstat (limited to 'ipalib')
-rw-r--r--ipalib/plugins/baseldap.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/ipalib/plugins/baseldap.py b/ipalib/plugins/baseldap.py
index f3e5b0fe..69bda6d8 100644
--- a/ipalib/plugins/baseldap.py
+++ b/ipalib/plugins/baseldap.py
@@ -49,10 +49,10 @@ def get_attributes(attrs):
Given a list of values in the form name=value, return a list of name.
"""
attrlist=[]
- for attr in attrs:
- m = re.match("\s*(.*?)\s*=\s*(.*?)\s*$", attr)
- attrlist.append(str(m.group(1)).lower())
-
+ if attrs:
+ for attr in attrs:
+ m = re.match("\s*(.*?)\s*=\s*(.*?)\s*$", attr)
+ attrlist.append(str(m.group(1)).lower())
return attrlist