Fixes for address idle, to properly catch when role is NULL
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 33s
Create Docker Image / Build Docker Image (arm64) (push) Successful in -17h41m59s
Create Docker Image / Final Docker Image Manifest (push) Successful in 9s

This commit is contained in:
Deon George 2024-10-09 14:12:19 +11:00
parent c76995fa00
commit 5e7bf0554a

View File

@ -228,7 +228,7 @@ class AddressIdle implements ShouldQueue
->when($ao,fn($query)=>$query->where('addresses.id',$ao->id)) ->when($ao,fn($query)=>$query->where('addresses.id',$ao->id))
->where(fn($q)=>$q->where('last_session','<',$age)->orWhereNull('last_session')) ->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 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']) ->join('systems',['systems.id'=>'addresses.system_id'])
->ftnOrder() ->ftnOrder()
->with(['system','zone.domain']) ->with(['system','zone.domain'])