From 7a007d958b502df0aa94f03489db54680bdac655 Mon Sep 17 00:00:00 2001 From: Pavel Zuna Date: Tue, 17 Aug 2010 14:53:03 -0400 Subject: 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 --- ipalib/plugins/baseldap.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ipalib') 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 -- cgit