Add system_id when listing AKAs, so that we can reference the system relation.
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 38s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m54s
Create Docker Image / Final Docker Image Manifest (push) Successful in 8s

This commit is contained in:
Deon George 2024-06-21 14:44:28 +10:00
parent 4f6e1e90c6
commit e65e664792

View File

@ -395,7 +395,8 @@ class Address extends Model
*/ */
public function scopeFTN($query) public function scopeFTN($query)
{ {
return $query->select(['id','addresses.zone_id','host_id','node_id','point_id']) return $query
->select(['id','addresses.zone_id','host_id','node_id','point_id','system_id'])
->with([ ->with([
'zone:zones.id,domain_id,zone_id', 'zone:zones.id,domain_id,zone_id',
'zone.domain:domains.id,name', 'zone.domain:domains.id,name',
@ -602,9 +603,13 @@ class Address extends Model
public function nodes_hub(): HasMany public function nodes_hub(): HasMany
{ {
return $this->hasMany(Address::class,'hub_id','id') return $this->hasMany(Address::class,'hub_id','id')
->FTN() ->select(['id','addresses.zone_id','host_id','node_id','point_id','system_id'])
->active() ->active()
->FTNorder(); ->FTNorder()
->with([
'zone:zones.id,domain_id,zone_id',
'zone.domain:domains.id,name',
]);
} }
/** /**