scrap buying many resells

This commit is contained in:
Ludovic Stephan 2016-09-19 16:08:12 +02:00
parent 7f2717c10c
commit f679338910
4 changed files with 17 additions and 29 deletions

View file

@ -272,8 +272,7 @@ class SpectacleRevente(models.Model):
spectacle = self.attribution.spectacle
seller = self.seller
if inscrits.exists():
idx = random.randint(0, inscrits.count() - 1)
winner = inscrits.all()[idx]
winner = random.choice(inscrits.all())
self.soldTo = winner
mail_buyer = """Bonjour,