Skip to content

Commit

Permalink
Prevent exception on review wanted rss feeds
Browse files Browse the repository at this point in the history
The recent changes on the notification system, included
dropping the creation of dedicated notifications of type
review for 'ReviewWanted' events. Instead they are also
associated to the corresponding BsRequst.
This is not handled by the new RSS feed templates, which leads
to an exception. To prevent the exception on ReviewWanted events,
we can switch back to the older version of the templates, which
base on the event payload itself. Since the event payload
hasn't changed, the older templated are still working as expected.

Fixes #9899

Co-authored-by: Daniel Donisa <daniel.donisa@suse.com>
Co-authored-by: David Kang <dkang@suse.com>
  • Loading branch information
3 people committed Jul 10, 2020
1 parent ded2115 commit 7d78e41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/app/views/webui/feeds/notifications.rss.builder
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ xml.rss version: '2.0' do

@notifications.each do |notification|
xml.item do
if notification.notifiable
if notification.notifiable && notification.event_type != 'Event::ReviewWanted'
xml.title notification.title
xml.description render(
template: "notifications/#{notification.template_name}",
Expand Down

0 comments on commit 7d78e41

Please sign in to comment.