From d799b859eae33c897eb940d63db0650d28ede5d4 Mon Sep 17 00:00:00 2001 From: Jonathan Rehm Date: Fri, 7 Jul 2017 18:22:05 -0700 Subject: [PATCH] Make changes suggested by codacy --- cps/static/js/main.js | 10 +++++----- cps/web.py | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cps/static/js/main.js b/cps/static/js/main.js index 55ea42b3..04b00712 100644 --- a/cps/static/js/main.js +++ b/cps/static/js/main.js @@ -121,15 +121,15 @@ $(function() { }); }); - $('#bookDetailsModal') - .on('show.bs.modal', function(e) { - var $modalBody = $(this).find('.modal-body'); + $("#bookDetailsModal") + .on("show.bs.modal", function(e) { + var $modalBody = $(this).find(".modal-body"); $.get(e.relatedTarget.href).done(function(content) { $modalBody.html(content); }); }) - .on('hidden.bs.modal', function() { - $(this).find('.modal-body').html('...'); + .on("hidden.bs.modal", function() { + $(this).find(".modal-body").html("..."); }); $(window).resize(function(event) { diff --git a/cps/web.py b/cps/web.py index 9d73b173..ba7d92fc 100755 --- a/cps/web.py +++ b/cps/web.py @@ -412,8 +412,8 @@ def timestamptodate(date, fmt=None): @app.template_filter('yesno') -def yesno(str, yes, no): - return yes if str else no +def yesno(value, yes, no): + return yes if value else no def admin_required(f):