Always check resource conflict for new events

Fixes #2541
pull/17/head
Francis Lachapelle 2014-02-24 07:55:21 -05:00
parent be36e0ceea
commit 2b6428efd0
1 changed files with 6 additions and 5 deletions

View File

@ -813,13 +813,14 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
{
// New event -- send invitation to all attendees
attendees = [newEvent attendeesWithoutUser: ownerUser];
// We catch conflicts and abort the save process immediately
// in case of one with resources
if ((ex = [self _handleAddedUsers: attendees fromEvent: newEvent]))
return ex;
if ([attendees count])
{
// We catch conflicts and abort the save process immediately
// in case of one with resources
if ((ex = [self _handleAddedUsers: attendees fromEvent: newEvent]))
return ex;
[self sendEMailUsingTemplateNamed: @"Invitation"
forObject: [newEvent itipEntryWithMethod: @"request"]
previousObject: nil