Compare commits

..

3 Commits

Author SHA1 Message Date
e1bd2b7d06 Add a maintenance page
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 1m47s
Create Docker Image / Final Docker Image Manifest (push) Successful in 8s
2024-10-23 12:42:13 +11:00
1837e69520 Increase number of attempts when trying to poll a system
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 34s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m46s
Create Docker Image / Final Docker Image Manifest (push) Successful in 9s
2024-10-23 12:07:10 +11:00
da098064bc Improvements to handle rogue 2D adresses 2024-10-23 12:06:53 +11:00

View File

@ -260,17 +260,18 @@ class Address extends Model
$o->node_id = $ftn['f'];
$o->point_id = $ftn['p'];
$zo = Zone::where('zone_id',$ftn['z'])
->when($do,fn($query)=>$query->where('domain_id',$do->id))
->single();
$o->zone_id = $zo?->id;
if (($ftn['z'] === 0) || (! $zo)) {
if ($ftn['z'] === 0) {
Log::alert(sprintf('%s:! newFTN was parsed an FTN [%s] with a zero zone, adding empty zone in domain',self::LOGKEY,$address));
$zo = new Zone;
$zo->domain_id = $do?->id;
} else {
$zo = Zone::where('zone_id',$ftn['z'])
->when($do,fn($query)=>$query->where('domain_id',$do->id))
->single();
$o->zone_id = $zo?->id;
}
$o->zone()->associate($zo);