mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-30 20:12:58 -04:00 
			
		
		
		
	Merge pull request #6344 from turbo124/v5-develop
Fixes for live preview
This commit is contained in:
		
						commit
						d6f2ce4bb1
					
				| @ -187,7 +187,7 @@ class Handler extends ExceptionHandler | ||||
|         } elseif ($exception instanceof NotFoundHttpException && $request->expectsJson()) { | ||||
|             return response()->json(['message'=>'Route does not exist'], 404); | ||||
|         } elseif ($exception instanceof MethodNotAllowedHttpException && $request->expectsJson()) { | ||||
|             return response()->json(['message'=>'Method not support for this route'], 404); | ||||
|             return response()->json(['message'=>'Method not supported for this route'], 404); | ||||
|         } elseif ($exception instanceof ValidationException && $request->expectsJson()) { | ||||
|             nlog($exception->validator->getMessageBag()); | ||||
|             return response()->json(['message' => 'The given data was invalid.', 'errors' => $exception->validator->getMessageBag()], 422); | ||||
|  | ||||
| @ -191,7 +191,7 @@ class PreviewController extends BaseController | ||||
| 
 | ||||
|             if($request->has('entity_id')){ | ||||
| 
 | ||||
|                 $entity_obj = $class::whereId($this->decodePrimaryKey($request->input('entity_id')))->company()->first(); | ||||
|                 $entity_obj = $class::withTrashed()->whereId($this->decodePrimaryKey($request->input('entity_id')))->company()->first(); | ||||
|                 $entity_obj = $repo->save($request->all(), $entity_obj); | ||||
| 
 | ||||
|             } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user