[interchange] enforce integer weights when writing to ups_cache database

Peter Ajamian interchange-cvs at icdevgroup.org
Fri Sep 16 21:01:33 UTC 2011


commit f69e9c2f132d886658676762fc42d59b395dc812
Author: Steve Graham <icdev at mrlock.com>
Date:   Fri Sep 16 14:28:25 2011 -0500

    enforce integer weights when writing to ups_cache database
    
    Signed-off-by: Peter Ajamian <peter at pajamian.dhs.org>
    
    Author:    Steve Graham <icdev at mrlock.com>

 lib/Vend/Ship/QueryUPS.pm |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/lib/Vend/Ship/QueryUPS.pm b/lib/Vend/Ship/QueryUPS.pm
index 4aafb0c..85e4cc8 100644
--- a/lib/Vend/Ship/QueryUPS.pm
+++ b/lib/Vend/Ship/QueryUPS.pm
@@ -29,6 +29,7 @@ use Vend::Util;
 use Vend::Interpolate;
 use Vend::Data;
 use Vend::Ship;
+use POSIX qw(ceil);
 
 my $Have_Business_UPS;
 eval {
@@ -113,6 +114,7 @@ sub calculate {
 				or last CACHE;
 			my $tname = $db->name();
 			$cache = 1;
+			$weight = ceil($weight);
 			%cline = (
 				weight => $weight,
 				origin => $origin,



More information about the interchange-cvs mailing list