component file sharing: fix incorrect use of returnValue in items async method
This commit is contained in:
parent
5c6bac6ade
commit
0d214783a3
1 changed files with 2 additions and 4 deletions
|
|
@ -814,7 +814,7 @@ class Comments_handler(pubsub.PubSubService):
|
|||
continue
|
||||
|
||||
def _getFrom(self, item_elt):
|
||||
"""retrieve published of an item
|
||||
"""retrieve publisher of an item
|
||||
|
||||
@param item_elt(domish.element): <item> element
|
||||
@return (unicode): full jid as string
|
||||
|
|
@ -845,9 +845,7 @@ class Comments_handler(pubsub.PubSubService):
|
|||
file_data = await self.getFileData(requestor, nodeIdentifier)
|
||||
comments = file_data["extra"].get("comments", [])
|
||||
if itemIdentifiers:
|
||||
defer.returnValue(
|
||||
[generic.parseXml(c[2]) for c in comments if c[0] in itemIdentifiers]
|
||||
)
|
||||
return [generic.parseXml(c[2]) for c in comments if c[0] in itemIdentifiers]
|
||||
else:
|
||||
return [generic.parseXml(c[2]) for c in comments]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue