1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-21 00:41:34 +02:00

Merge pull request #6403 from turbo124/v5-develop

Fixes for preview
This commit is contained in:
David Bomba 2021-08-05 22:48:23 +10:00 committed by GitHub
commit 03af63b02c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -204,9 +204,6 @@ class PreviewController extends BaseController
if($request->has('entity_id')){
info("trying to find entity id = " . $this->decodePrimaryKey($request->input('entity_id')));
info("company id = " . $company->id);
$entity_obj = $class::on($company->db)
->where('id', $this->decodePrimaryKey($request->input('entity_id')))
->where('company_id', $company->id)
@ -215,6 +212,8 @@ class PreviewController extends BaseController
if($entity_obj)
info("found a valid entity object");
else
$entity_obj = $factory;
$entity_obj = $repo->save($request->all(), $entity_obj);