Commit b42091af authored by Sofia Papagiannaki's avatar Sofia Papagiannaki

ModularBackend list_containers returns unique list of shared containers

parent 40525312
...@@ -230,16 +230,7 @@ class ModularBackend(BaseBackend): ...@@ -230,16 +230,7 @@ class ModularBackend(BaseBackend):
return allowed[start:start + limit] return allowed[start:start + limit]
if shared: if shared:
allowed = [x.split('/', 2)[1] for x in self.permissions.access_list_shared(account)] allowed = [x.split('/', 2)[1] for x in self.permissions.access_list_shared(account)]
# uniqify allowed list allowed = list(set(allowed))
idfun = lambda(x): x
seen = {}
result = []
for item in allowed:
m = idfun(item)
if m not in seen:
seen[m] = 1
result.append(item)
allowed = result
start, limit = self._list_limits(allowed, marker, limit) start, limit = self._list_limits(allowed, marker, limit)
return allowed[start:start + limit] return allowed[start:start + limit]
node = self.node.node_lookup(account) node = self.node.node_lookup(account)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment