Unit tests fixed + models & routers update
This commit is contained in:
@ -32,16 +32,7 @@ class NewsletterTemplate extends Model {
|
||||
$template->set($data);
|
||||
}
|
||||
|
||||
$saved = $template->save();
|
||||
|
||||
if($saved === true) {
|
||||
return true;
|
||||
} else {
|
||||
$errors = $template->getValidationErrors();
|
||||
if(!empty($errors)) {
|
||||
return $errors;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
$template->save();
|
||||
return $template;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user