Make sure there is a calendar after delete.
This commit is contained in:
parent
3c75ac5f62
commit
f6aa366857
|
@ -198,6 +198,10 @@ class OC_Calendar_Calendar{
|
|||
$stmt = OCP\DB::prepare( 'DELETE FROM *PREFIX*calendar_objects WHERE calendarid = ?' );
|
||||
$stmt->execute(array($id));
|
||||
|
||||
if(count(self::allCalendars()) == 0) {
|
||||
self::addCalendar(OCP\USER::getUser(),'Default calendar');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue