fix on sale_channel get_default

This commit is contained in:
Ludovic CANDELLIER
2023-02-17 22:07:43 +01:00
parent 0778fdc10a
commit 923f988aba

View File

@@ -10,7 +10,8 @@ class Users extends parentUsers
public static function getInfo($id = false)
{
$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;
}
}