diff --git a/app/controllers/serviceLearning/routes.py b/app/controllers/serviceLearning/routes.py index be08837e6..95812e395 100644 --- a/app/controllers/serviceLearning/routes.py +++ b/app/controllers/serviceLearning/routes.py @@ -205,12 +205,14 @@ def withdrawCourse(courseID): if g.current_user.isAdmin or g.current_user.isFaculty: withdrawProposal(courseID) flash("Course successfully withdrawn", 'success') + return "" else: flash("Unauthorized to perform this action", 'warning') except Exception as e: print(e) flash("Withdrawal Unsuccessful", 'warning') - return "" + + return "", 500 @serviceLearning_bp.route('/proposalReview/', methods = ['GET', 'POST']) diff --git a/app/static/js/slcManagement.js b/app/static/js/slcManagement.js index b62f72784..5326ae3ee 100644 --- a/app/static/js/slcManagement.js +++ b/app/static/js/slcManagement.js @@ -125,7 +125,7 @@ function renew(){ location = '/serviceLearning/editProposal/' + newID; }, error: function(request, status, error) { - console.log(status,error); + location.reload(); } }) resetAllSelections() @@ -140,12 +140,8 @@ function withdraw(){ location.reload(); }, error: function(request, status, error) { - console.log(status,error); - + location.reload(); }, - done: function () { - $('#' + courseID).val('---'); - } }); };