From: Diane Trout Date: Tue, 30 Jun 2009 23:45:19 +0000 (+0000) Subject: Allow cellline and conditition to be blank [ticket:115] [ticket:105] X-Git-Tag: 0.2.6~22 X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=7685e5132966a386cd4c7d8449097dc3acaedd96 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 --- 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)