# HG changeset patch # User Goffi # Date 1371424471 -7200 # Node ID 65d4fed44edfb5c342f9ff36cd115fa991edaecd # Parent f0cd02c032b32290bc314330bd54e3a973b8e3a3 fixed notifications (a key was missing in data in some cases) diff -r f0cd02c032b3 -r 65d4fed44edf sat_pubsub/backend.py --- a/sat_pubsub/backend.py Mon May 06 00:26:37 2013 +0200 +++ b/sat_pubsub/backend.py Mon Jun 17 01:14:31 2013 +0200 @@ -391,8 +391,9 @@ if items: reactor.callLater(0, self.dispatch, {'items': items, - 'nodeIdentifier': node.nodeIdentifier, - 'subscription': subscription}, + 'node': node, + 'subscription': subscription, + }, '//event/pubsub/notify') config = node.getConfiguration() @@ -670,7 +671,7 @@ if affiliation != 'owner': raise error.Forbidden() - data = {'nodeIdentifier': node.nodeIdentifier, + data = {'node': node, 'redirectURI': redirectURI} d = defer.DeferredList([cb(data) @@ -867,7 +868,7 @@ def _preDelete(self, data): - nodeIdentifier = data['nodeIdentifier'] + nodeIdentifier = data['node'].nodeIdentifier redirectURI = data.get('redirectURI', None) d = self.backend.getSubscribers(nodeIdentifier) d.addCallback(lambda subscribers: self.pubsubService.notifyDelete(