Unavailabilities can only attach a provider record
This commit is contained in:
parent
bcc9b88623
commit
89b9c802a2
1 changed files with 1 additions and 19 deletions
|
@ -344,15 +344,6 @@ class Unavailabilities_model extends EA_Model {
|
|||
{
|
||||
switch ($resource)
|
||||
{
|
||||
case 'service':
|
||||
$unavailability['service'] = $this
|
||||
->db
|
||||
->get_where('services', [
|
||||
'id' => $unavailability['id_services']
|
||||
])
|
||||
->row_array();
|
||||
break;
|
||||
|
||||
case 'provider':
|
||||
$unavailability['provider'] = $this
|
||||
->db
|
||||
|
@ -362,15 +353,6 @@ class Unavailabilities_model extends EA_Model {
|
|||
->row_array();
|
||||
break;
|
||||
|
||||
case 'customer':
|
||||
$unavailability['customer'] = $this
|
||||
->db
|
||||
->get_where('users', [
|
||||
'id' => $unavailability['id_users_customer']
|
||||
])
|
||||
->row_array();
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new InvalidArgumentException('The requested unavailability relation is not supported: ' . $resource);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue