Commit 556aa34a authored by Valentin Samir's avatar Valentin Samir

Bad unique constrain

parent 0bc4e899
......@@ -128,8 +128,11 @@ class ServicePattern(models.Model):
class Usernames(models.Model):
value = models.CharField(max_length=255)
service_pattern = models.ForeignKey(ServicePattern, related_name="usernames")
class ReplaceAttributName(models.Model):
name = models.CharField(max_length=255, unique=True, help_text=u"nom d'un attributs à transmettre au service")
class Meta:
unique_together = ('name', 'service_pattern')
name = models.CharField(max_length=255, help_text=u"nom d'un attributs à transmettre au service")
replace = models.CharField(max_length=255, blank=True, help_text=u"nom sous lequel l'attribut sera présenté au service. vide = inchangé")
service_pattern = models.ForeignKey(ServicePattern, related_name="attributs")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment