summaryrefslogtreecommitdiff
path: root/lib/Multi/API.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2020-07-13 11:06:42 +0200
committerYorhel <git@yorhel.nl>2020-07-13 11:06:42 +0200
commit4a3daf884119a57cd5c8bb4acda2a2c502a372ae (patch)
tree74d3cd9b80c4ad59f3f8541fb55208326561a032 /lib/Multi/API.pm
parentdf07156e7fd76d514c5cbeec8c88761c2335492b (diff)
Multi::API: Fix harmless Perl warning for entries without image
Diffstat (limited to 'lib/Multi/API.pm')
-rw-r--r--lib/Multi/API.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Multi/API.pm b/lib/Multi/API.pm
index 7e40e748..ac496949 100644
--- a/lib/Multi/API.pm
+++ b/lib/Multi/API.pm
@@ -375,10 +375,11 @@ sub splitarray {
sub image_flagging {
my($image, $obj) = @_;
my $flag = {
- votecount => 1*delete $obj->{c_votecount},
+ votecount => delete $obj->{c_votecount},
sexual_avg => delete $obj->{c_sexual_avg},
violence_avg => delete $obj->{c_violence_avg},
};
+ $flag->{votecount} *= 1 if defined $flag->{votecount};
$flag->{sexual_avg} *= 1 if defined $flag->{sexual_avg};
$flag->{violence_avg} *= 1 if defined $flag->{violence_avg};
$image ? $flag : undef;