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