Fix deletion of an appointment with attendees

pull/186/head
Francis Lachapelle 2016-01-08 13:41:04 -05:00
parent 321193472d
commit b6076c9e8e
1 changed files with 10 additions and 4 deletions

View File

@ -1,8 +1,8 @@
/* UIxObjectActions.m - this file is part of SOGo
*
* Copyright (C) 2007-2010 Inverse inc.
* Copyright (C) 2007-2016 Inverse inc.
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
* Author: Inverse <info@inverse.ca>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -28,6 +28,7 @@
#import <NGObjWeb/WORequest.h>
#import <NGObjWeb/WOResponse.h>
#import <SoObjects/SOGo/SOGoContentObject.h>
#import <SoObjects/SOGo/SOGoObject.h>
#import <SoObjects/SOGo/SOGoPermissions.h>
@ -99,13 +100,18 @@
{
WOResponse *response;
NSDictionary *data;
SOGoContentObject *deleteObject;
deleteObject = [self clientObject];
if ([deleteObject respondsToSelector: @selector (prepareDelete)])
[deleteObject prepareDelete];
response = (WOResponse *) [deleteObject delete];
response = (WOResponse *) [[self clientObject] delete];
if (response)
{
data = [NSDictionary dictionaryWithObjectsAndKeys: [(NSException *) response reason], @"error", nil];
response = [self responseWithStatus: 403
andString: [data jsonRepresentation]];
andJSONRepresentation: data];
}
else
{