From 64b9471b18ec2f82946b113c494ca48371911e0a Mon Sep 17 00:00:00 2001 From: Devops Date: Tue, 27 Jun 2017 09:28:25 +0100 Subject: [PATCH] bin/ovh-api --- bin/ovh-api | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/ovh-api b/bin/ovh-api index b5522f18..d8850a4f 100755 --- a/bin/ovh-api +++ b/bin/ovh-api @@ -125,7 +125,7 @@ sub _query { $id = check_row($url,$id); next unless defined $id; - $id =~ s,/.*$,,; +# NB 27.06.17 $id =~ s,/.*$,,; eval { $response = $Api->rawCall(path=>$url.'/'.$id,method=>($method||'GET'),body=>{}); }; @@ -310,7 +310,6 @@ my @tbs = ( } if (!defined $val) { -# NB 09.02.17 no use of COALESCE $val = 'NULL'; $val = "''"; } elsif($fd->{sql} =~ /BOOLEAN/) { @@ -356,7 +355,10 @@ sub check_row { # Scalar return undef if $url eq '/ip' and $id !~ /\d+\./; - $id =~ s,/.*$,,; + +# NB 27.06.17 $id =~ s,/.*$,,; + $id =~ s,/32$,,; + return $id; } -- 2.47.3