Created
August 20, 2012 23:02
-
-
Save josephmisiti/3408960 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@login_required | |
def employee_create(request, employee_id): | |
applicant = MHRBoxApplicant.objects.get(account_id=employee_id) | |
job = MHRBoxJob.objects.get(id=applicant.job.id) | |
try: | |
employee = MHRBoxEmployee.objects.get(unique_id=employee_id,job=job) | |
except MHRBoxEmployee.DoesNotExist: | |
logging.debug('Created new hrbox employee ~ apps.hrbox.views.employee') | |
info = {} | |
info['general'] = {} | |
info['general'] = applicant.info | |
info['resumepath'] = applicant.resumepath | |
info['coverpath'] = applicant.coverpath | |
employee = MHRBoxEmployee.objects.create(unique_id=employee_id,job=job,info=info) | |
employee.save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment