From 0778fdc10af4ce882b853ae988dced3f33adebd2 Mon Sep 17 00:00:00 2001 From: Ludovic CANDELLIER Date: Fri, 17 Feb 2023 21:47:36 +0100 Subject: [PATCH] fix if default sale channel empty --- app/Repositories/Shop/SaleChannels.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Repositories/Shop/SaleChannels.php b/app/Repositories/Shop/SaleChannels.php index f8b581c3..4d2317a9 100644 --- a/app/Repositories/Shop/SaleChannels.php +++ b/app/Repositories/Shop/SaleChannels.php @@ -8,7 +8,8 @@ class SaleChannels { public static function getDefaultID() { - return self::getDefault()->id; + $default = self::getDefault(); + return $default ? self::getDefault()->id : false; } public static function getDefault()