Commit 8da5d62c by dragonfi

Rename publish_event_from_python to publish_event_from_dict

parent 7ae7eb57
...@@ -15,9 +15,9 @@ class PublishEventMixin(object): ...@@ -15,9 +15,9 @@ class PublishEventMixin(object):
except KeyError as e: except KeyError as e:
return {'result': 'error', 'message': 'Missing event_type in JSON data'} return {'result': 'error', 'message': 'Missing event_type in JSON data'}
return self.publish_event_from_python(event_type, data) return self.publish_event_from_dict(event_type, data)
def publish_event_from_python(self, event_type, data): def publish_event_from_dict(self, event_type, data):
for key, value in self.additional_publish_event_data.items(): for key, value in self.additional_publish_event_data.items():
if key in data: if key in data:
return {'result': 'error', 'message': 'Key should not be in publish_event data: {}'.format(key)} return {'result': 'error', 'message': 'Key should not be in publish_event data: {}'.format(key)}
......
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