Fixed error on backend calendar when there are not services or providers.

This commit is contained in:
Alex Tselegidis 2015-11-05 20:38:13 +01:00
parent 5766490d59
commit adbd329f0c
1 changed files with 263 additions and 258 deletions

View File

@ -59,6 +59,11 @@ class Backend_api extends CI_Controller {
throw new Exception('You do not have the required privileges for this task.'); throw new Exception('You do not have the required privileges for this task.');
} }
if (!isset($_POST['filter_type'])) {
echo json_encode(array( 'appointments' => array()));
return;
}
$this->load->model('appointments_model'); $this->load->model('appointments_model');
$this->load->model('providers_model'); $this->load->model('providers_model');
$this->load->model('services_model'); $this->load->model('services_model');