mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-02 08:21:09 -08:00
Merge pull request #13347 from snipe/fixes/custom_report_error_on_bad_model
Possible alternative to fixing #13296 - custom report failing when th…
This commit is contained in:
commit
39ea15a27a
|
@ -390,7 +390,7 @@ class Asset extends Depreciable
|
||||||
*/
|
*/
|
||||||
public function depreciation()
|
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