diff options
-rw-r--r-- | master/master/models.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/master/master/models.py b/master/master/models.py index 6e2cd22..4a13950 100644 --- a/master/master/models.py +++ b/master/master/models.py @@ -36,7 +36,7 @@ class Slave(models.Model): choices=const.SLAVE_STATES) class Meta: - unique_together = ['owner', 'name'] + unique_together = ('owner', 'name') def __unicode__(self): return "%s/%s (%s)" % (self.owner, self.name, self.state) @@ -58,7 +58,7 @@ class Arch(models.Model): generic = models.CharField(max_length=25, blank=True) class Meta: - unique_together = ['specific', 'generic'] + unique_together = ('specific', 'generic') def __unicode__(self): return '%s (%s)' % (self.specific, self.generic) @@ -72,7 +72,7 @@ class Release(models.Model): archs = models.ManyToManyField(Arch) class Meta: - unique_together = ['name', 'provider'] + unique_together = ('name', 'provider') def __unicode__(self): return '%s (%s)' % (self.name, self.provider.name) @@ -94,7 +94,7 @@ class Mirror(models.Model): structure = models.CharField(max_length=200) class Meta: - unique_together = ['server', 'prefix'] + unique_together = ('server', 'prefix') def __unicode__(self): return '%s/%s (%s)' % (self.server, self.prefix, self.owner.name) @@ -128,12 +128,12 @@ class Job(models.Model): # Root jobuild atom; auto-converted to deplist atoms = models.TextField() # State of the job - state = models.CharField(max_length=30, unique=True, + state = models.CharField(max_length=30, choices=const.JOB_STATES, default='U', editable=False) class Meta: - unique_together = ['name', 'maintainer'] + unique_together = ('name', 'maintainer') def __unicode__(self): return '%s/%s (%s)' % (self.maintainer, self.name, self.state) |