Coding style: python's scope sucks

This commit is contained in:
Martin Pépin 2017-11-01 17:29:38 +01:00
parent f18959c0a1
commit 91bdf11852

View file

@ -361,6 +361,7 @@ class SpectacleRevente(models.Model):
inscrits = list(self.confirmed_entry.all())
spectacle = self.attribution.spectacle
seller = self.seller
winner = None
if inscrits:
# Envoie un mail au gagnant et au vendeur
@ -400,7 +401,6 @@ class SpectacleRevente(models.Model):
# Si personne ne veut de la place, elle part au shotgun
else:
winner = None
self.shotgun = True
self.tirage_done = True
self.save()