Skip to content

Commit

Permalink
Possible alternative to fixing #13296 - custom report failing when th…
Browse files Browse the repository at this point in the history
…e model is busted

Related: #13297
Signed-off-by: snipe <snipe@snipe.net>
  • Loading branch information
snipe committed Jul 20, 2023
1 parent 0b8a3ee commit 540b09c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Models/Asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ public function validationRules()
*/
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');
}


Expand Down

0 comments on commit 540b09c

Please sign in to comment.