From 713c525c5d0513cf8913ec61084200cb4c6e794b Mon Sep 17 00:00:00 2001 From: Diane Trout Date: Mon, 9 Mar 2009 18:39:02 +0000 Subject: [PATCH] Sort by library id, not creation data closes [ticket:116] I left the sort by creation date in there commented out, in case that's how hudson/alpha wants to do it. --- htsworkflow/frontend/samples/models.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htsworkflow/frontend/samples/models.py b/htsworkflow/frontend/samples/models.py index 95f6376..559eefe 100644 --- a/htsworkflow/frontend/samples/models.py +++ b/htsworkflow/frontend/samples/models.py @@ -115,7 +115,7 @@ class Affiliation(models.Model): class Library(models.Model): id = models.AutoField(primary_key=True) - library_id = models.CharField(max_length=30, db_index=True) + library_id = models.CharField(max_length=30, db_index=True, unique=True) library_name = models.CharField(max_length=100, unique=True) library_species = models.ForeignKey(Species) # new field 2008 Mar 5, alter table samples_library add column "hidden" NOT NULL default 0; @@ -152,7 +152,7 @@ class Library(models.Model): amplified_from_sample = models.ForeignKey('self', blank=True, null=True) undiluted_concentration = models.DecimalField("Concentration", - max_digits=5, decimal_places=2, default=0, blank=True, null=True, + max_digits=5, decimal_places=2, blank=True, null=True, help_text=u"Undiluted concentration (ng/\u00b5l)") # note \u00b5 is the micro symbol in unicode successful_pM = models.DecimalField(max_digits=9, decimal_places=1, blank=True, null=True) @@ -165,7 +165,8 @@ class Library(models.Model): class Meta: verbose_name_plural = "libraries" - ordering = ["-creation_date"] #["-library_id"] + #ordering = ["-creation_date"] + ordering = ["-library_id"] def antibody_name(self): str =''+self.antibody.nickname+'' -- 2.30.2