Prevent trying to send validation with candidate without interview
This commit is contained in:
parent
e8b0f3cf78
commit
127460e352
4 changed files with 21 additions and 13 deletions
|
|
@ -150,6 +150,14 @@ class Candidate(models.Model):
|
|||
else:
|
||||
return '{0}, option «{1}»'.format(self.get_section_display(), self.get_option_display())
|
||||
|
||||
@property
|
||||
def has_interview(self):
|
||||
try:
|
||||
self.interview
|
||||
return True
|
||||
except Interview.DoesNotExist:
|
||||
return False
|
||||
|
||||
@property
|
||||
def total_result(self):
|
||||
return (self.examination_result or 0) + (self.interview_result or 0) + (self.file_result or 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue