From 4a95a9692d7c2f75ae0f8d076f52957980f69e1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kv=C3=A1=C4=8Dek?= Date: Wed, 12 Oct 2016 16:33:07 +0200 Subject: [PATCH] FIX: fix saving new widget without container ID --- app/Models/Widget.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Widget.php b/app/Models/Widget.php index e1779ace..7373fbb2 100644 --- a/app/Models/Widget.php +++ b/app/Models/Widget.php @@ -46,7 +46,7 @@ class Widget extends Model $widget->user_id = \Auth::user()->id; $widget->name = $data->name; $widget->container_class = $data->containerClass; - $widget->container_id = $data->containerId; + $widget->container_id = empty($data->containerId) ? null : $data->containerId; // save description if available if (isset($data->description)) {