summaryrefslogtreecommitdiff
path: root/lib/Multi/API.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-12-17 14:39:41 +0100
committerYorhel <git@yorhel.nl>2010-12-17 14:48:04 +0100
commit50cfb305796d1d115c408feefbe39fddf7615166 (patch)
treec56da35435063a11b79837dfd8821f6a63719271 /lib/Multi/API.pm
parenteaf9e895daab98eb122f2570bb409794b3257c99 (diff)
Don't allow NULL for rr.minage and use -1 for unknown
This can be seen as a partial revert of 0a4f97f0186d6941a4cab2e3bd05201f1fed1441. I used to think using NULL for special values is more "correct" in database terms. But in the end I guess I should be aiming for whatever solution is easier. Both are "correct" in a sense anyway.
Diffstat (limited to 'lib/Multi/API.pm')
-rw-r--r--lib/Multi/API.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Multi/API.pm b/lib/Multi/API.pm
index 4872acf9..3f1b24c4 100644
--- a/lib/Multi/API.pm
+++ b/lib/Multi/API.pm
@@ -648,7 +648,7 @@ sub get_release_res {
if(grep /details/, @{$get->{info}}) {
$_->{website} ||= undef;
$_->{notes} ||= undef;
- $_->{minage} *= 1 if defined $_->{minage};
+ $_->{minage} = $_->{minage} < 0 ? undef : $_->{minage}*1;
$_->{gtin} ||= undef;
$_->{catalog} ||= undef;
}