summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/unit/test-011-wallace_resources.py2
-rw-r--r--wallace/module_resources.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/unit/test-011-wallace_resources.py b/tests/unit/test-011-wallace_resources.py
index ccec4b1..9c42317 100644
--- a/tests/unit/test-011-wallace_resources.py
+++ b/tests/unit/test-011-wallace_resources.py
@@ -127,7 +127,7 @@ class TestWallaceResources(unittest.TestCase):
def _mock_search_entry_by_attribute(self, attr, value, **kw):
results = []
if value == "cn=Room 101,ou=Resources,dc=example,dc=org":
- results.append({ 'dn': 'cn=Rooms,ou=Resources,dc=example,dc=org', attr: value, 'owner': 'uid=doe,ou=People,dc=example,dc=org' })
+ results.append(('cn=Rooms,ou=Resources,dc=example,dc=org', { attr: value, 'owner': 'uid=doe,ou=People,dc=example,dc=org' }))
return results
def _mock_smtp_init(self, host=None, port=None, local_hostname=None, timeout=0):
diff --git a/wallace/module_resources.py b/wallace/module_resources.py
index 7c23995..f398120 100644
--- a/wallace/module_resources.py
+++ b/wallace/module_resources.py
@@ -809,7 +809,7 @@ def get_resource_owner(resource):
if not isinstance(collections, list):
collections = [ collections ]
- for collection in collections:
+ for dn,collection in collections:
if collection.has_key('owner') and isinstance(collection['owner'], list):
owners += collection['owner']
elif collection.has_key('owner'):