Commit b857e8ac1a1003ee50c8cd986050fcc8c32ad468
Committed by
Nick Recobra
1 parent
c39f715e
Exists in
master
and in
1 other branch
Bug when receiving a hoptoad notice without a request in the params.
Showing
1 changed file
with
1 additions
and
0 deletions
Show diff stats
app/models/notice.rb
| ... | ... | @@ -23,6 +23,7 @@ class Notice |
| 23 | 23 | hoptoad_notice = Hoptoad::V2.parse_xml(hoptoad_xml) |
| 24 | 24 | app = App.find_by_api_key!(hoptoad_notice['api-key']) |
| 25 | 25 | |
| 26 | + hoptoad_notice['request'] ||= {} | |
| 26 | 27 | hoptoad_notice['request']['component'] = 'unknown' if hoptoad_notice['request']['component'].blank? |
| 27 | 28 | hoptoad_notice['request']['action'] = nil if hoptoad_notice['request']['action'].blank? |
| 28 | 29 | ... | ... |