added unique contraint to Tag.name filed
authorRami Rauch <rrauch@stanford.edu>
Fri, 6 Feb 2009 22:17:38 +0000 (22:17 +0000)
committerRami Rauch <rrauch@stanford.edu>
Fri, 6 Feb 2009 22:17:38 +0000 (22:17 +0000)
htswfrontend/htswfrontend/fctracker/models.py

index 3029e09fd14d138525f00787252836b922418ed3..95b4a84f3c4a7f6ec0cfb305c17a867562b46e63 100644 (file)
@@ -123,7 +123,7 @@ class Affiliation(models.Model):
       )
 
 class Tag(models.Model):
-  tag_name = models.CharField(max_length=100, db_index=True,core=True,blank=False,null=False)
+  tag_name = models.CharField(max_length=100, unique=True,db_index=True,core=True,blank=False,null=False)
   TAG_CONTEXT = (
       #('Antibody','Antibody'),
       #('Cellline', 'Cellline'),
@@ -249,7 +249,7 @@ class Library(models.Model):
     rc = "%1.2f" % (res[1]/1000000.0)
     # Color Scheme: green is more than 12M, blue is more than 5M, orange is more than 3M and red is less. For RNAseq, all those thresholds should be doubled
     if res[0] > 0:
-      bgcolor = '#ff3300'  # Red, the color for minimum read count
+      bgcolor = '#FFCDD0'  # Red, the color for minimum read count
       rc_thr = [12000000,5000000,3000000]
       if self.experiment_type == 'RNA-seq':
         rc_thr = [20000000,10000000,6000000]