[FIX] hr_recruitment: Fix traceback on job creation
Currently, when creating job postion from config menu then it will generate the traceback of key error. So in this commit, If job id found in result then assign the documents_ids of that job else set the false. TaskID: 2283753
This commit is contained in:
@@ -72,7 +72,7 @@ class Job(models.Model):
|
||||
result[attachment.res_id] |= attachment
|
||||
|
||||
for job in self:
|
||||
job.document_ids = result[job.id]
|
||||
job.document_ids = result.get(job.id, False)
|
||||
job.documents_count = len(job.document_ids)
|
||||
|
||||
def _compute_all_application_count(self):
|
||||
|
||||
Reference in New Issue
Block a user