Fixed a small bug added during the last commit

This commit is contained in:
2011-07-05 12:35:43 +01:00
parent f034c85273
commit 2ac48b2cf0

View File

@@ -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 """
if check_permissions(request.user, app):
app = Application.objects.get(id=applicationid)
if check_permissions(request.user, app):
if request.method == 'POST':
obj = Audit(application=app, user=request.user, event=AUDIT_EVENT_MESSAGE)
form = AdminNoteForm(request.POST, instance=obj, application=app)