diff --git a/symposion/proposals/models.py b/symposion/proposals/models.py index 3c953c39..b5880243 100644 --- a/symposion/proposals/models.py +++ b/symposion/proposals/models.py @@ -8,6 +8,7 @@ from django.utils.translation import ugettext_lazy as _ from django.utils.timezone import now from django.contrib.auth.models import User +from django.core.exceptions import ObjectDoesNotExist import reversion @@ -124,6 +125,13 @@ class ProposalBase(models.Model): def number(self): return str(self.pk).zfill(3) + @property + def status(self): + try: + return self.result.status + except ObjectDoesNotExist: + return 'undecided' + def speakers(self): yield self.speaker speakers = self.additional_speakers.exclude(