From 2ac48b2cf0e21d61da939a7ff37874ac55cc2c28 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Tue, 5 Jul 2011 12:35:43 +0100 Subject: [PATCH] Fixed a small bug added during the last commit --- app/hr/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/hr/views.py b/app/hr/views.py index 577afb5..fb04891 100644 --- a/app/hr/views.py +++ b/app/hr/views.py @@ -219,8 +219,8 @@ def add_note(request, applicationid): def add_message(request, applicationid): """ Send a message to the end user and note it on the application """ + app = Application.objects.get(id=applicationid) if check_permissions(request.user, app): - app = Application.objects.get(id=applicationid) if request.method == 'POST': obj = Audit(application=app, user=request.user, event=AUDIT_EVENT_MESSAGE) form = AdminNoteForm(request.POST, instance=obj, application=app)