Fixed postgres complaint about integer = boolean comparison (I hope!)
This commit is contained in:
@@ -284,7 +284,7 @@ class Organisation extends Model implements OrganisationInterface, TokenOwnerInt
|
||||
public function scopeWithUser($query, $userId)
|
||||
{
|
||||
$membersInner = DB::table('organisation_members')
|
||||
->selectRaw('organisation_id, flag_approved = 1 AS is_member, flag_admin AS is_admin, flag_approved = 0 AS is_pending')
|
||||
->selectRaw('organisation_id, flag_approved = ? AS is_member, flag_admin AS is_admin, flag_approved = ? AS is_pending', [true, false])
|
||||
->where('user_id', $userId);
|
||||
return $query
|
||||
->leftJoinSub($membersInner, 'user_orgs', function ($join) {
|
||||
|
||||
Reference in New Issue
Block a user