Skip to content

Commit

Permalink
Fixes #2997 - don’t include soft-deleted maintenances
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Dec 1, 2016
1 parent 5bca1ed commit d8d800b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions app/Http/Controllers/AssetMaintenancesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ public function getIndex()
*/
public function getDatatable()
{
$maintenances = AssetMaintenance::with('asset', 'supplier', 'asset.company','admin')
->withTrashed();
$maintenances = AssetMaintenance::with('asset', 'supplier', 'asset.company','admin');

if (Input::has('search')) {
$maintenances = $maintenances->TextSearch(e(Input::get('search')));
Expand Down
3 changes: 1 addition & 2 deletions app/Models/Asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,7 @@ public function assetmaintenances()
{

return $this->hasMany('\App\Models\AssetMaintenance', 'asset_id')
->orderBy('created_at', 'desc')
->withTrashed();
->orderBy('created_at', 'desc');
}

/**
Expand Down

0 comments on commit d8d800b

Please sign in to comment.