Skip to content

Commit 2cff242

Browse files
committed
Github:11728 (fix in Office365.event.attachments - deuze)
1 parent 78ac5e3 commit 2cff242

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

Project/Sources/Classes/Office365Calendar.4dm

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,16 +183,24 @@ Function _insertEvent($inParameters : Object; $inEvent : Object) : Object // Fo
183183
var $params : Object:={eventId: $response.id; calendarId: String($inParameters.calendarId)}
184184
var $attachment : Object
185185

186+
$response.attachments:=[]
186187
For each ($attachment; $attachments)
187188

188-
var $status : Object:=This._insertAttachment($params; $attachment)
189-
If ($status.success=False)
190-
return This._returnStatus($status)
189+
var $result : Object:=This._insertAttachment($params; $attachment)
190+
If ($result.success)
191+
Try
192+
OB REMOVE($result; "success")
193+
OB REMOVE($result; "errors")
194+
OB REMOVE($result; "statusText")
195+
End try
196+
$response.attachments.push(This._cleanGraphObject($result))
197+
Else
198+
return This._returnStatus($result)
191199
End if
192200
End for each
193201
End if
194202

195-
return This._returnStatus($response)
203+
return This._returnStatus(This._cleanGraphObject($response))
196204

197205

198206
// Mark: - [Public]

0 commit comments

Comments
 (0)