X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=lib%2FNDWeb%2FController%2FStats.pm;h=9379e99c0aa8574835eb86ddee63728bf49dae7a;hb=d6b15c14f164e7150ffcaed86e8aa79795b2d89a;hp=e2c784d929bb837f33c5504e12dbd2db87d0d236;hpb=677178daefe481e0144a2fc08ee2744839b450ad;p=ndwebbie.git diff --git a/lib/NDWeb/Controller/Stats.pm b/lib/NDWeb/Controller/Stats.pm index e2c784d..9379e99 100644 --- a/lib/NDWeb/Controller/Stats.pm +++ b/lib/NDWeb/Controller/Stats.pm @@ -62,7 +62,7 @@ FROM galaxies g GROUP BY raid,p.tick,x,y ) AS a JOIN galaxies g USING (tick,x,y) - WHERE a.count::float / g.planets >= 0.5 + WHERE a.count::float / NULLIF(g.planets,0) >= 0.5 ORDER BY x,y,tick ) AS raid USING (x,y)