Skip to content

Commit

Permalink
Fixed scope chaining on assigned_to
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Feb 11, 2015
1 parent 268fb98 commit 5867c60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/Asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,9 @@ public function scopePending($query)

public function scopeRTD($query)
{
return $query->whereHas('assetstatus',function($query)
return $query->whereNULL('assigned_to')->whereHas('assetstatus',function($query)
{
$query->where('deployable','=',1)->where('pending','=',0)->where('archived','=',0)->whereNULL('assigned_to');
$query->where('deployable','=',1)->where('pending','=',0)->where('archived','=',0);
});
}

Expand Down

0 comments on commit 5867c60

Please sign in to comment.