we need both last_campaign and last_campaign_status after all; template can't handle all the logic for status in event of last_campaign = None
parent
773789dc99
commit
6e81dce947
|
@ -133,6 +133,14 @@ class Work(models.Model):
|
|||
except:
|
||||
last = None
|
||||
return last
|
||||
|
||||
def last_campaign_status(self):
|
||||
campaign = self.last_campaign
|
||||
if campaign:
|
||||
status = campaign.status
|
||||
else:
|
||||
status = "No campaign yet"
|
||||
return status
|
||||
|
||||
def percent_unglued(self):
|
||||
status = 0
|
||||
|
|
Loading…
Reference in New Issue