Skip to content

Commit

Permalink
corrected job type -branch post bug
Browse files Browse the repository at this point in the history
  • Loading branch information
upcomingnewton committed Sep 15, 2012
1 parent 6cc8ed7 commit 8b0e2ef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tx2/jobs/Views/JobViews.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ def BranchJobEdit(HttpRequest,CompanyID, JobID):
isinitial = 'Initial_' + str(branch.id)
if (isinitial) in HttpRequest.POST:
isinitial = HttpRequest.POST[isinitial]
result = [1,-1]
if isinitial != "-1":
# edit
_id = int(isinitial)
Expand All @@ -344,7 +345,7 @@ def BranchJobEdit(HttpRequest,CompanyID, JobID):
Comments2 = HttpRequest.POST["Remarks_" + str(branch.id)]
JobTypeID = HttpRequest.POST["JobType_" + str(branch.id)]
result = BranchJobFunctionsObj.Add(branch.id,JobID,JobTypeID,Comments1,Comments2,int(details['userid']),HttpRequest.META['REMOTE_ADDR'])
print str(result) + '==' + branch.BranchName
#print str(result) + '==' + branch.BranchName
if result[0] != 1:
messages.error(HttpRequest,'ERROR : ' + result[1])
return HttpResponseRedirect('/message/')
Expand Down

0 comments on commit 8b0e2ef

Please sign in to comment.