Compare commits

..

3 Commits

Author SHA1 Message Date
a32e2e504a Add a maintenance page
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 35s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m50s
Create Docker Image / Final Docker Image Manifest (push) Successful in 8s
2024-10-23 12:56:50 +11:00
7e87481e05 Increase number of attempts when trying to poll a system 2024-10-23 12:56:50 +11:00
670450387c Improvements to handle rogue 2D adresses 2024-10-23 12:56:50 +11:00

View File

@ -260,18 +260,17 @@ class Address extends Model
$o->node_id = $ftn['f'];
$o->point_id = $ftn['p'];
if ($ftn['z'] === 0) {
$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)) {
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);