mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-10 10:02:33 +03:00
Suppress Google Syncing exception whenever a Google Calendar event is not found.
This commit is contained in:
parent
aff86bd021
commit
1e88d37879
1 changed files with 10 additions and 2 deletions
|
@ -231,7 +231,11 @@ class Google_Sync {
|
||||||
* be deleted.
|
* be deleted.
|
||||||
*/
|
*/
|
||||||
public function delete_appointment($provider, $google_event_id) {
|
public function delete_appointment($provider, $google_event_id) {
|
||||||
|
try {
|
||||||
$this->service->events->delete($provider['settings']['google_calendar'], $google_event_id);
|
$this->service->events->delete($provider['settings']['google_calendar'], $google_event_id);
|
||||||
|
} catch (Exception $ex) {
|
||||||
|
// Event was not found on Google Calendar.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -299,7 +303,11 @@ class Google_Sync {
|
||||||
* @param string $google_event_id Google Calendar event id to be deleted.
|
* @param string $google_event_id Google Calendar event id to be deleted.
|
||||||
*/
|
*/
|
||||||
public function delete_unavailable($provider, $google_event_id) {
|
public function delete_unavailable($provider, $google_event_id) {
|
||||||
|
try {
|
||||||
$this->service->events->delete($provider['settings']['google_calendar'], $google_event_id);
|
$this->service->events->delete($provider['settings']['google_calendar'], $google_event_id);
|
||||||
|
} catch (Exception $ex) {
|
||||||
|
// Event was not found on Google Calendar.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue