From: Rami Rauch Date: Fri, 16 Jan 2009 21:43:17 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=3e621c450a175eb4c991354d12daa041faad8d97 --- diff --git a/htswfrontend/htswfrontend/exp_track/models.py b/htswfrontend/htswfrontend/exp_track/models.py index 08397e6..faf0911 100755 --- a/htswfrontend/htswfrontend/exp_track/models.py +++ b/htswfrontend/htswfrontend/exp_track/models.py @@ -1,5 +1,6 @@ from django.db import models from htswfrontend.fctracker.models import * +from django.core.exceptions import ObjectDoesNotExist class FlowCell(models.Model): @@ -69,15 +70,20 @@ class FlowCell(models.Model): return '%s' % (self.flowcell_id) def Create_LOG(self): - str = '' #New!' + str = '' str +='Create LOG' + try: + t = DataRun.objects.get(fcid=self.id) + str +='
DataRun ..' + except ObjectDoesNotExist: + str += '
not sequenced' return str Create_LOG.allow_tags = True def Lanes(self): return '
1)%s2)%s3)%s4)%s5)%s6)%s7)%s8)%s
' % (self.lane_1_library,self.lane_2_library,self.lane_3_library,self.lane_4_library,self.lane_5_library,self.lane_6_library,self.lane_7_library,self.lane_8_library) Lanes.allow_tags = True - + class Meta: ordering = ["-run_date"] @@ -129,7 +135,7 @@ class DataRun(models.Model): str += ' style="color:green">' str += ''+self.RUN_STATUS_CHOICES[self.run_status][1]+'' str += '

' #New!' - str +='
View QC Page' + str +='
View QC Page' else: str += '>'+self.RUN_STATUS_CHOICES[self.run_status][1]