mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for base repo
This commit is contained in:
parent
2fe47f572a
commit
392a4e5ccb
@ -146,8 +146,9 @@ class BaseRepository
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
protected function alternativeSave($data, $model)
|
||||
{
|
||||
if (array_key_exists('client_id', $data) && !empty($data['client_id'])) {
|
||||
{ //$start = microtime(true);
|
||||
//forces the client_id if it doesn't exist
|
||||
if (array_key_exists('client_id', $data)) {
|
||||
$model->client_id = $data['client_id'];
|
||||
}
|
||||
|
||||
@ -176,6 +177,7 @@ class BaseRepository
|
||||
|
||||
if (isset($tmp_data['client_contacts'])) {
|
||||
unset($tmp_data['client_contacts']);
|
||||
}
|
||||
|
||||
$model->fill($tmp_data);
|
||||
|
||||
@ -195,7 +197,7 @@ class BaseRepository
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$model->saveQuietly();
|
||||
|
||||
/* Model now persisted, now lets do some child tasks */
|
||||
|
Loading…
x
Reference in New Issue
Block a user