From 6430be01670385f2f6868aa49577aaa347503900 Mon Sep 17 00:00:00 2001 From: Deon George Date: Wed, 9 Oct 2024 14:12:19 +1100 Subject: [PATCH] Fixes for address idle, to properly catch when role is NULL --- app/Jobs/AddressIdle.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Jobs/AddressIdle.php b/app/Jobs/AddressIdle.php index eb59647..337e76c 100644 --- a/app/Jobs/AddressIdle.php +++ b/app/Jobs/AddressIdle.php @@ -228,7 +228,7 @@ class AddressIdle implements ShouldQueue ->when($ao,fn($query)=>$query->where('addresses.id',$ao->id)) ->where(fn($q)=>$q->where('last_session','<',$age)->orWhereNull('last_session')) ->whereRaw(sprintf('((role IS NULL) OR (role=0) OR ((role & %d) > 0))',$flags)) - ->whereRaw(sprintf('((role & %d) = 0)',Address::NODE_KEEP)) + ->whereRaw(sprintf('((role IS NULL) OR ((role & %d) = 0))',Address::NODE_KEEP)) ->join('systems',['systems.id'=>'addresses.system_id']) ->ftnOrder() ->with(['system','zone.domain'])