aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek.chauhan@gmail.com>2008-10-15 20:45:26 +0530
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2008-10-15 20:45:26 +0530
commita6fe0aa8ecb48db9852af4cf99cc15da78d87246 (patch)
tree98b793b2a5032a1003ce94f6b18617c095b125bb
parent[bugfix] Fix faulty detection of const.MASTER_DIR (diff)
downloadautotua-a6fe0aa8ecb48db9852af4cf99cc15da78d87246.tar.gz
autotua-a6fe0aa8ecb48db9852af4cf99cc15da78d87246.tar.bz2
autotua-a6fe0aa8ecb48db9852af4cf99cc15da78d87246.zip
models.Job().status *can't* be unique=True
That was a brain-fart :p Noticed by Anielkis Herrera González (p0w3r3d)
-rw-r--r--master/master/models.py12
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)