Event, which comes from OBS doesn't have 'type' field. 'event_type'
should be used.
Looks like this code has never been tested and as a result caused
serious production issue: all email notifications have been lost.
Fixes: #1360
Change-Id: Ie73949d4d270219ee2261597b2418ec1a3a8b806
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
return_dict = {}
- if request['type'] not in MAIL_TRIGGERS:
+ if request['event_type'] not in MAIL_TRIGGERS:
return {}
rid = request['id']
for event, triggers in MAIL_TRIGGERS.iteritems():
- if request['type'] != event:
+ if request['event_type'] != event:
continue
for tri in triggers: