dblock / slack-gamebot

Ping pong, chess, pool and other games bot for Slack.
MIT License
129 stars 103 forks source link

Seasons: comparison of NilClass with 1 failed (ArgumentError) #84

Closed dblock closed 8 years ago

dblock commented 8 years ago
2016-01-29T22:02:40.551903+00:00 app[worker.1]: E, [2016-01-29T22:02:40.551709 #3] ERROR -- : comparison of NilClass with 1 failed (ArgumentError)
2016-01-29T22:02:40.551907+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/mongoid-5.0.2/lib/mongoid/contextual/memory.rb:104:in `block in each'
2016-01-29T22:02:40.551909+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/mongoid-5.0.2/lib/mongoid/contextual/memory.rb:103:in `each'
2016-01-29T22:02:40.551910+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/mongoid-5.0.2/lib/mongoid/contextual/memory.rb:103:in `each'
2016-01-29T22:02:40.551911+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/mongoid-5.0.2/lib/mongoid/contextual/aggregable/memory.rb:104:in `min_by'
2016-01-29T22:02:40.551912+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/mongoid-5.0.2/lib/mongoid/contextual/aggregable/memory.rb:104:in `aggregate_by'
2016-01-29T22:02:40.551913+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/mongoid-5.0.2/lib/mongoid/contextual/aggregable/memory.rb:63:in `min'
2016-01-29T22:02:40.551914+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/mongoid-5.0.2/lib/mongoid/contextual.rb:12:in `min'
2016-01-29T22:02:40.551915+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/mongoid-5.0.2/lib/mongoid/relations/many.rb:10:in `min'
2016-01-29T22:02:40.551916+00:00 app[worker.1]: /app/slack-gamebot/models/season.rb:33:in `winners'
2016-01-29T22:02:40.551916+00:00 app[worker.1]: /app/slack-gamebot/models/season.rb:26:in `to_s'
2016-01-29T22:02:40.551917+00:00 app[worker.1]: /app/slack-gamebot/commands/seasons.rb:7:in `map'
2016-01-29T22:02:40.551917+00:00 app[worker.1]: /app/slack-gamebot/commands/seasons.rb:7:in `call'
2016-01-29T22:02:40.551918+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/slack-ruby-bot-0.6.1/lib/slack-ruby-bot/commands/base.rb:57:in `block in invoke'
2016-01-29T22:02:40.551919+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/slack-ruby-bot-0.6.1/lib/slack-ruby-bot/commands/base.rb:48:in `each_pair'
2016-01-29T22:02:40.551920+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/slack-ruby-bot-0.6.1/lib/slack-ruby-bot/commands/base.rb:48:in `invoke'
2016-01-29T22:02:40.551921+00:00 app[worker.1]: /app/config/initializers/slack-ruby-bot/commands/base.rb:10:in `invoke'
2016-01-29T22:02:40.551922+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/slack-ruby-bot-0.6.1/lib/slack-ruby-bot/hooks/message.rb:10:in `block in message'
2016-01-29T22:02:40.551923+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/slack-ruby-bot-0.6.1/lib/slack-ruby-bot/hooks/message.rb:10:in `each'
2016-01-29T22:02:40.551924+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/slack-ruby-bot-0.6.1/lib/slack-ruby-bot/hooks/message.rb:10:in `detect'
2016-01-29T22:02:40.551924+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/slack-ruby-bot-0.6.1/lib/slack-ruby-bot/hooks/message.rb:10:in `message'
dblock commented 8 years ago

This was just bad unranked user data in a very old season.