On Fri, Apr 17, 2015 at 8:16 AM, Jyothi Naidu <jyothi.n...@gmail.com> wrote:

>
>  if 'audit_info_manage' in request.POST:
> 192         #fullname = Employee.objects.get(emp_id=request.POST['emp_id'])
> 193         audit_manage_key = request.POST.get('audit_info_getdata')
> 194         if audit_manage_key:
> 195             audit_manage_key = request.POST.get('audit_info_getdata')
> 196             if audit_manage_key:
> 197                 try:
> 198                     audit_info = 
> EmployeeAuditInfo.objects.get(pk=audit_manage_key)
> 199                     SUCCESS_MESSAGE = 'Updated Status successfully'
> 200                 except EmployeeAuditInfo.DoesNotExist:
> 201                     audit_info = EmployeeAuditInfo()
> 202                     SUCCESS_MESSAGE = 'Disable an Employee successfully'
> 203
> 204             if audit_info:
> 205                 #form_emp_id = int(request.POST['emp_id'])
> 206                 employee = 
> Employee.objects.get(emp_id=request.POST['emp_id'])
> 207                 employee.save
> 208                 audit_info = EmployeeAuditInfo()
> 209                 audit_info.emp_id = employee
> 210                 audit_info.status = request.POST['status']
> 211                 audit_info.updated_by = request.user
> 212                 audit_info.created_on = request.POST['created_on']
> 213                 audit_info.modified_on = request.POST['modified_on']
> 214                 audit_info.reason = request.POST['reason']
> 215                 audit_info.save()
>
>
Line 207 doesn't save the employee object. You forgot ().

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAD4ANxU_T7qp2NekkLGFVJ0R8Xh-AXuHHNw15s-2m3i3aZ5rZw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to