fix on sale_channel get_default

This commit is contained in:
Ludovic CANDELLIER
2023-02-17 22:07:43 +01:00
parent c1d7f3fe10
commit 03a52d504b

View File

@@ -10,7 +10,8 @@ class Users extends parentUsers
public static function getInfo($id = false) public static function getInfo($id = false)
{ {
$data = parent::getInfo($id); $data = parent::getInfo($id);
$data['sale_channel'] = SaleChannels::getDefault()->toArray(); $sale_channel_default = SaleChannels::getDefault();
$data['sale_channel'] = $sale_channel_default ? $sale_channel_default->toArray() : false;
return $data; return $data;
} }
} }