mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 07:34:06 -08:00
Possible alternative to fixing #13296 - custom report failing when the model is busted
Related: https://github.com/snipe/snipe-it/pull/13297 Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
0b8a3ee9a5
commit
540b09c506
|
@ -390,7 +390,7 @@ class Asset extends Depreciable
|
|||
*/
|
||||
public function depreciation()
|
||||
{
|
||||
return $this->model->belongsTo(\App\Models\Depreciation::class, 'depreciation_id');
|
||||
return $this->hasOneThrough(\App\Models\Depreciation::class,\App\Models\AssetModel::class,'id','id','model_id','depreciation_id');
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue