FIX: fix update from migrations

This commit is contained in:
Michal Kváček
2016-09-20 20:58:52 +02:00
parent f25ef4ab1b
commit 40949eaa90
+9 -5
View File
@@ -14,12 +14,16 @@ class TemplateServiceProvider extends ServiceProvider
private function getTemplate() private function getTemplate()
{ {
// select template // select template
$template = Module::where('is_template', true) try {
->where('enabled', true) $template = Module::where('is_template', true)
->first(); ->where('enabled', true)
->first();
if ($template) { if ($template) {
$template->settings = json_decode($template->module_settings); $template->settings = json_decode($template->module_settings);
}
} catch (\Exception $e) {
return null;
} }
return $template; return $template;