minor cleanup
authorJacob Hilker <hilker.j@gmail.com>
Sun, 2 Feb 2014 23:14:11 +0000 (18:14 -0500)
committerJacob Hilker <hilker.j@gmail.com>
Sun, 2 Feb 2014 23:14:11 +0000 (18:14 -0500)
karmaworld/apps/courses/views.py
karmaworld/assets/js/course-detail.js

index 4be59b844ba7a28ea596159534a2bae399d6b86d..541eb4ed3cd13d1f7e1672915f39cf7d36b54332 100644 (file)
@@ -222,7 +222,6 @@ def edit_course(request, pk):
 
             return HttpResponse(json.dumps(resp), mimetype="application/json")
         else:
-            print course_form.errors
             return HttpResponseBadRequest(json.dumps({'status': 'fail', 'message': 'Validation error',
                                           'errors': course_form.errors}),
                                           mimetype="application/json")
index 443e977d1bd1a932ed816a240c29d493f776ed64..70bc4203a9dba37d7d1cdeda08c02319c0906bf5 100644 (file)
@@ -64,6 +64,7 @@ $(function() {
 
         // Delete all errors that currently exist
         $('.validation_error').remove()
+        $('#course_form_errors').empty();
 
         // Failed responses with no errors -> display message
         if (!errors) {