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)) {