Cleaned up debug messages and forced typed conversion on status check

This commit is contained in:
2010-04-20 22:24:15 +01:00
parent f8280b8bd7
commit f1aeebfe79

View File

@@ -163,11 +163,9 @@ def update_application(request, applicationid):
ib = Inbox(settings.REDDIT_USER, settings.REDDIT_PASSWD)
ib.send(application.user.redditaccount_set.all()[0].username, subject, message)
print app.status, APPLICATION_STATUS_ACCEPTED
if int(app.status) == APPLICATION_STATUS_ACCEPTED:
print "Yup!"
send_message(app, 'accepted')
elif app.status == APPLICATION_STATUS_REJECTED:
elif int(app.status) == APPLICATION_STATUS_REJECTED:
send_message(app, 'rejected')
return HttpResponseRedirect(reverse('hr.views.view_application', args=[applicationid]))