Rework address roles, making Address::role optional, rework determining uplink/downlinks/parent/children
This commit is contained in:
@@ -117,7 +117,7 @@ function our_address(Domain|Address $o=NULL): Collection|Address|NULL
|
||||
$filter = $our->filter(function($item) use ($o) { return $item->zone->domain_id === $o->zone->domain_id; })->sortBy('role');
|
||||
|
||||
// If we are looking for a specific address, and there is only 1 result, return it, otherwise return what we have
|
||||
if (config('fido.strict') && ($x=$filter->filter(function($item) use ($o) { return $item->role <= $o->role; })->sortBy('role'))->count())
|
||||
if (config('fido.strict') && ($x=$filter->filter(function($item) use ($o) { return $item->role_id <= $o->role_id; })->sortBy('role'))->count())
|
||||
$filter = $x;
|
||||
|
||||
return $filter->last();
|
||||
|
Reference in New Issue
Block a user