mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 23:02:19 +00:00
Cleaned up debug messages and forced typed conversion on status check
This commit is contained in:
@@ -163,11 +163,9 @@ def update_application(request, applicationid):
|
|||||||
ib = Inbox(settings.REDDIT_USER, settings.REDDIT_PASSWD)
|
ib = Inbox(settings.REDDIT_USER, settings.REDDIT_PASSWD)
|
||||||
ib.send(application.user.redditaccount_set.all()[0].username, subject, message)
|
ib.send(application.user.redditaccount_set.all()[0].username, subject, message)
|
||||||
|
|
||||||
print app.status, APPLICATION_STATUS_ACCEPTED
|
|
||||||
if int(app.status) == APPLICATION_STATUS_ACCEPTED:
|
if int(app.status) == APPLICATION_STATUS_ACCEPTED:
|
||||||
print "Yup!"
|
|
||||||
send_message(app, 'accepted')
|
send_message(app, 'accepted')
|
||||||
elif app.status == APPLICATION_STATUS_REJECTED:
|
elif int(app.status) == APPLICATION_STATUS_REJECTED:
|
||||||
send_message(app, 'rejected')
|
send_message(app, 'rejected')
|
||||||
|
|
||||||
return HttpResponseRedirect(reverse('hr.views.view_application', args=[applicationid]))
|
return HttpResponseRedirect(reverse('hr.views.view_application', args=[applicationid]))
|
||||||
|
|||||||
Reference in New Issue
Block a user