mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
commit
9d568de394
@ -204,16 +204,13 @@ class PreviewController extends BaseController
|
|||||||
|
|
||||||
if($request->has('entity_id')){
|
if($request->has('entity_id')){
|
||||||
|
|
||||||
$entity_obj = $class::on($company->db)
|
$entity_obj = $class::where('id', $this->decodePrimaryKey($request->input('entity_id')))
|
||||||
->where('id', $this->decodePrimaryKey($request->input('entity_id')))
|
|
||||||
->where('company_id', $company->id)
|
->where('company_id', $company->id)
|
||||||
->withTrashed()
|
->withTrashed()
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
if($entity_obj)
|
if($entity_obj)
|
||||||
info("found a valid entity object");
|
info("found a valid entity object");
|
||||||
else
|
|
||||||
$entity_obj = $factory;
|
|
||||||
|
|
||||||
$entity_obj = $repo->save($request->all(), $entity_obj);
|
$entity_obj = $repo->save($request->all(), $entity_obj);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user