Fix adding of incident templates

This commit is contained in:
James Brooks
2016-12-03 21:18:36 +00:00
parent 07767521b4
commit 3eb74058b2
3 changed files with 6 additions and 4 deletions

View File

@@ -180,7 +180,10 @@ class IncidentController extends Controller
public function createIncidentTemplateAction()
{
try {
IncidentTemplate::create(Binput::get('template'));
IncidentTemplate::create([
'name' => Binput::get('name'),
'template' => Binput::get('template', null, false, false)
]);
} catch (ValidationException $e) {
return cachet_redirect('dashboard.templates.create')
->withInput(Binput::all())