The Schedule page crashes because it will loop through 32 teams, irregardless of how many are in the database.
A similar issue causes the crash for the Statistics page, because it will try to calculate the average gametime of an empty sequence of games. Inspecting this class also had me wondering why Mongo.Matches.FindAll() is called 4 times instead of just once, and why the statistics are longs instead of decimal values.
Both of these crashed can be avoided with an if statement like 7da8755852e080f023b68332de04541333b7463e
The Schedule page crashes because it will loop through 32 teams, irregardless of how many are in the database.
A similar issue causes the crash for the Statistics page, because it will try to calculate the average gametime of an empty sequence of games. Inspecting this class also had me wondering why
Mongo.Matches.FindAll()
is called 4 times instead of just once, and why the statistics are longs instead of decimal values.Both of these crashed can be avoided with an if statement like 7da8755852e080f023b68332de04541333b7463e