cheshire137 / competiwatch

Web app to track and visualize your competitive match history in Overwatch.
MIT License
17 stars 4 forks source link

Matches page resulting in error for a user #69

Closed cheshire137 closed 6 years ago

cheshire137 commented 6 years ago

https://www.competiwatch.com/season/9/Bkid2-1719 results in a "we're sorry but something went wrong" error for the owner, as reported on Reddit. That message sounds like a 500 error. I didn't see any errors in the logs that looked related.

Need to be able to view a season as an admin to reproduce bugs without having to create a SeasonShare record that makes the season public for everyone. Maybe a special URL parameter that if an admin passes they can view the page?

cheshire137 commented 6 years ago
ActionView::Template::Error (no implicit conversion from nil to integer):
<td class="match-cell sr-change-cell" style="<%= match_rank_change_style(match, matches) %>">
app/helpers/matches_helper.rb:257:in `[]'
app/helpers/matches_helper.rb:257:in `win_loss_rank_change_color'
cheshire137 commented 6 years ago

The last match in the season had a blank "+/- SR" column because its prior_match_id was invalid (the prior match had been deleted, is my guess). Need to do a callback in Match so that if it gets deleted, the subsequent match's prior_match is updated.