def update_resume(self, user): if user.resume: resume = user.resume else: resume = Resume() resume.user_id = user.id self.populate_obj(resume) db.session.add(resume) db.session.commit() return resume
def update_resume(self): resume = Resume() resume.user_id = current_user.id resume.resume_type = 1 resume.photo = self.photo.data resume.expect_salary_min = self.expect_salary_min.data resume.expect_salary_max = self.expect_salary_min.data resume.edu_exp = self.edu_exp.data resume.self_intro = self.self_intro.data resume.project_exp = self.project_exp.data resume.expect_job = self.expect_job.data resume.attachment = self.attachment.data db.session.add(resume) db.session.commit() return resume
def create_resume(self, user): resume = Resume() resume.user_id = user.id db.session.add(resume) db.session.commit()