From 292432df127ac75303c1bb4e636aa2e90709925d Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Fri, 7 Oct 2016 12:19:19 -0400 Subject: [PATCH] Don't remove the "c_component" condition in search This will fix a bug when we'll support recurrent tasks! --- SoObjects/Appointments/SOGoAppointmentFolder.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index a6a1c3ffa..4e6711fb8 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -1491,7 +1491,8 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir // replace the date range if (r) { - [baseWhere removeLastObject]; + if ([baseWhere count] > 1) + [baseWhere removeLastObject]; dateSqlString = [self _sqlStringRangeFrom: _startDate to: endDate cycle: YES];