fix fields.W342 warning ForeignKey(unique=True) -> OneToOneField

This commit is contained in:
Basile Clement 2016-05-24 00:28:30 +02:00
parent 6782f2991a
commit 3e3f0e9f49
3 changed files with 3 additions and 3 deletions

View file

@ -48,7 +48,7 @@ PAYMENT_TYPES = (
)
class Participant (models.Model):
user = models.ForeignKey(User, unique = True)
user = models.OneToOneField(User)
choices = models.ManyToManyField(Spectacle, through = "ChoixSpectacle", related_name = "chosen_by")
attributions = models.ManyToManyField(Spectacle, through = "Attribution", related_name = "attributed_to")
paid = models.BooleanField (u"A payé", default = False)

View file

@ -48,7 +48,7 @@ PAYMENT_TYPES = (
)
class Participant (models.Model):
user = models.ForeignKey(User, unique = True, related_name = "participants2")
user = models.OneToOneField(User, related_name = "participants2")
choices = models.ManyToManyField(Spectacle, through = "ChoixSpectacle", related_name = "chosen_by")
attributions = models.ManyToManyField(Spectacle, through = "Attribution", related_name = "attributed_to")
paid = models.BooleanField (u"A payé", default = False)

View file

@ -48,7 +48,7 @@ PAYMENT_TYPES = (
)
class Participant (models.Model):
user = models.ForeignKey(User, unique = True, related_name = "participants3")
user = models.OneToOneField(User, related_name = "participants3")
choices = models.ManyToManyField(Spectacle, through = "ChoixSpectacle", related_name = "chosen_by")
attributions = models.ManyToManyField(Spectacle, through = "Attribution", related_name = "attributed_to")
paid = models.BooleanField (u"A payé", default = False)