mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-29 03:12:39 +03:00
Can replace customer notes with empty notes (#541).
This commit is contained in:
parent
6707524ed4
commit
7279b1911e
1 changed files with 1 additions and 9 deletions
|
@ -129,16 +129,8 @@ class Customers_Model extends CI_Model {
|
||||||
*/
|
*/
|
||||||
protected function _update($customer)
|
protected function _update($customer)
|
||||||
{
|
{
|
||||||
// Do not update empty string values.
|
|
||||||
foreach ($customer as $key => $value)
|
|
||||||
{
|
|
||||||
if ($value === '')
|
|
||||||
{
|
|
||||||
unset($customer[$key]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->db->where('id', $customer['id']);
|
$this->db->where('id', $customer['id']);
|
||||||
|
|
||||||
if ( ! $this->db->update('ea_users', $customer))
|
if ( ! $this->db->update('ea_users', $customer))
|
||||||
{
|
{
|
||||||
throw new Exception('Could not update customer to the database.');
|
throw new Exception('Could not update customer to the database.');
|
||||||
|
|
Loading…
Reference in a new issue