From 7685e5132966a386cd4c7d8449097dc3acaedd96 Mon Sep 17 00:00:00 2001 From: Diane Trout Date: Tue, 30 Jun 2009 23:45:19 +0000 Subject: [PATCH] Allow cellline and conditition to be blank [ticket:115] [ticket:105] However this requires a dump and reload of the database to work. This saves the data as a django 'fixture' python manage.py dumpdata samples > /tmp/sampledata.json python manage.py sqlreset samples | sqlite3 [path to db] python manage.py loadddata /tmp/sampledata.json --- htsworkflow/frontend/samples/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htsworkflow/frontend/samples/models.py b/htsworkflow/frontend/samples/models.py index f51d250..7f90f25 100644 --- a/htsworkflow/frontend/samples/models.py +++ b/htsworkflow/frontend/samples/models.py @@ -120,8 +120,8 @@ class Library(models.Model): library_species = models.ForeignKey(Species) # new field 2008 Mar 5, alter table samples_library add column "hidden" NOT NULL default 0; hidden = models.BooleanField() - cell_line = models.ForeignKey(Cellline, null=True) - condition = models.ForeignKey(Condition, null=True) + cell_line = models.ForeignKey(Cellline, blank=True, null=True) + condition = models.ForeignKey(Condition, blank=True, null=True) antibody = models.ForeignKey(Antibody,blank=True,null=True) # New field Aug/25/08. SQL: alter table fctracker_library add column "lib_affiliation" varchar(256) NULL; affiliations = models.ManyToManyField(Affiliation,related_name='library_affiliations',null=True) -- 2.30.2