Fix generate basket

This commit is contained in:
Gabriel Augendre 2023-03-25 21:27:56 +01:00
parent c1e2138a4a
commit 46aff0bd56

View file

@ -45,7 +45,8 @@ class Command(BaseCommand):
items_in_basket = len(products)
if items_in_basket < 1:
items_in_basket = 1
selected_products = np.random.Generator(
rng = np.random.default_rng()
selected_products = rng.choice(
products,
size=items_in_basket,
replace=False,