Always randomize supplier articles
This commit is contained in:
parent
95c59de4fc
commit
56b5fd6279
1 changed files with 1 additions and 3 deletions
|
@ -132,9 +132,7 @@ class Command(MyBaseCommand):
|
|||
|
||||
supplier, created = Supplier.objects.get_or_create(name="Panoramix")
|
||||
if created:
|
||||
articles = Article.objects.filter(category__name="Autres Bieres")
|
||||
if not articles.exists():
|
||||
articles = random.sample(Article.objects.all(), 30)
|
||||
articles = random.sample(list(Article.objects.all()), 40)
|
||||
to_create = []
|
||||
for article in articles:
|
||||
to_create.append(SupplierArticle(
|
||||
|
|
Loading…
Reference in a new issue