From 427fed7bf3e1104427ddad3c5fe33e8d6b3658ec Mon Sep 17 00:00:00 2001 From: Yannick Trinh Date: Tue, 9 Jan 2024 17:23:23 +0100 Subject: [PATCH] Fix ACI0104487 Jobs:ACI0104487 --- Project/Sources/Classes/GoogleMail.4dm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Project/Sources/Classes/GoogleMail.4dm b/Project/Sources/Classes/GoogleMail.4dm index 73d0afc..374ae55 100644 --- a/Project/Sources/Classes/GoogleMail.4dm +++ b/Project/Sources/Classes/GoogleMail.4dm @@ -254,10 +254,15 @@ Function getMails($inMailIds : Collection; $inParameters : Object) : Collection Else var $result : Collection:=Null + var $mailIds : Collection:=(Value type($inMailIds)=Is collection) ? $inMailIds : [] - If ($inMailIds.length=1) + If (($mailIds.length>0) && (Value type($mailIds[0])=Is object)) + $mailIds:=$mailIds.extract("id") + End if + + If ($mailIds.length=1) - var $response : Variant:=This.getMail($inMailIds[0]; $inParameters) + var $response : Variant:=This.getMail($mailIds[0]; $inParameters) If ($response#Null) $result:=New collection($response) End if @@ -265,13 +270,8 @@ Function getMails($inMailIds : Collection; $inParameters : Object) : Collection Else var $URL; $urlParams; $userId; $mailType; $mailId; $format : Text - var $mailIds : Collection:=(Value type($inMailIds)=Is collection) ? $inMailIds : [] var $parameters : Object - If (($mailIds.length>0) && (Value type($mailIds[0])=Is object)) - $mailIds:=$mailIds.extract("id") - End if - $URL:=Super._getURL() $userId:=(Length(String(This.userId))>0) ? This.userId : "me" $mailType:=(Length(String($inParameters.mailType))>0) ? $inParameters.mailType : This.mailType