Compare commits
3 Commits
e1bd2b7d06
...
a32e2e504a
Author | SHA1 | Date | |
---|---|---|---|
a32e2e504a | |||
7e87481e05 | |||
670450387c |
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user