Mail validation errors is now an object, and must be tested with ->count()
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 1m42s
Create Docker Image / Final Docker Image Manifest (push) Successful in 11s

This commit is contained in:
Deon George 2024-05-21 22:10:52 +10:00
parent da7bfcc4e2
commit 903c19dbeb
3 changed files with 3 additions and 3 deletions

View File

@ -88,7 +88,7 @@ class PacketProcess implements ShouldQueue
// Check the packet is to our address, if not we'll reject it.
if (! our_address($this->do)->contains($pkt->tftn)) {
Log::error(sprintf('%s:! Packet [%s] is not to our address? [%s]',self::LOGKEY,$this->filename,$pkt->tftn));
Log::error(sprintf('%s:! Packet [%s] is not to our address? [%s]',self::LOGKEY,$this->filename,$pkt->tftn->ftn));
// @todo Notification::route('netmail',$pkt->fftn)->notify(new UnexpectedPacketToUs($this->filename));
break;

View File

@ -92,7 +92,7 @@ final class Echomail extends Model implements Packet
parent::boot();
static::creating(function($model) {
if (! is_null($model->errors))
if ($model->errors->count())
throw new \Exception('Cannot save, validation errors exist');
});

View File

@ -86,7 +86,7 @@ final class Netmail extends Model implements Packet
parent::boot();
static::creating(function($model) {
if (! is_null($model->errors))
if ($model->errors->count())
throw new \Exception('Cannot save, validation errors exist');
});