Fix for messages originating from a point, where PATH: is empty
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 40s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m31s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s

This commit is contained in:
2025-01-07 21:02:32 +11:00
parent 29cbc80982
commit 3e202e34d2
2 changed files with 13 additions and 5 deletions

View File

@@ -142,7 +142,13 @@ abstract class Packet extends FTNBase implements \Iterator, \Countable
Log::info(sprintf('%s:- Packet [%s] is a [%s] packet',self::LOGKEY,$o->name,get_class($o)));
if ($o->fz && ($o->fd || $so)) {
if ($o->fz && $o->fd) {
$o->zone = Zone::where('zone_id',$o->fz)
->join('domains',['domains.id'=>'zones.domain_id'])
->where('name',$o->fd)
->single();
} elseif ($o->fz && $so) {
Log::alert(sprintf('%s:! No domain in the packet, work it out from the system [%d] for zone [%d]',self::LOGKEY,$so->name,$o->fz));
if (($x=$so->zones->where('zone_id',$o->fz)->unique('domain_id'))->count() === 1) {
@@ -163,7 +169,7 @@ abstract class Packet extends FTNBase implements \Iterator, \Countable
->sole();
} catch (ModelNotFoundException $e) {
throw new InvalidPacketException(sprintf('%s:! We couldnt work out the packet zone, and there isnt a default for[%d]',self::LOGKEY,$o->fz));
throw new InvalidPacketException(sprintf('%s:! We couldnt work out the packet zone, and there isnt a default for [%d]',self::LOGKEY,$o->fz));
}
}