[dw-free] clean up error logs
[commit: http://hg.dwscoalition.org/dw-free/rev/188c1afc510d]
http://bugs.dwscoalition.org/show_bug.cgi?id=2812
Handle moods in entries (imported by a client?) that don't actually exist on
our servers.
Patch by
kareila.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=2812
Handle moods in entries (imported by a client?) that don't actually exist on
our servers.
Patch by
Files modified:
- cgi-bin/DW/Controller/Latest/Mood.pm
--------------------------------------------------------------------------------
diff -r a3517b21587c -r 188c1afc510d cgi-bin/DW/Controller/Latest/Mood.pm
--- a/cgi-bin/DW/Controller/Latest/Mood.pm Tue Oct 05 11:49:20 2010 +0800
+++ b/cgi-bin/DW/Controller/Latest/Mood.pm Tue Oct 05 11:51:43 2010 +0800
@@ -52,6 +52,7 @@ sub mood_handler {
my $metadata = DW::Mood->get_moods;
foreach my $moodid ( @$moods ) {
+ next unless $metadata->{$moodid};
$score += $metadata->{$moodid}->{weight} || 50;
$counts{$metadata->{$moodid}->{name}}++;
}
--------------------------------------------------------------------------------
