Generated mail from the hub wont have $model->errors defined
This commit is contained in:
@@ -86,7 +86,7 @@ final class Netmail extends Model implements Packet
|
||||
parent::boot();
|
||||
|
||||
static::creating(function($model) {
|
||||
if ($model->errors->count())
|
||||
if (isset($model->errors) && $model->errors->count())
|
||||
throw new \Exception('Cannot save, validation errors exist');
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user