From be8995816f6ecd2d82cb508e9a34aff0cb0d9d2f Mon Sep 17 00:00:00 2001
From: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Date: Tue, 30 Jan 2018 14:06:27 -0300
Subject: [PATCH] Bug 19230: (follow-up) Preventing warn when deleting course

Simplify 'unless' statement
---
 .../intranet-tmpl/prog/en/modules/course_reserves/course-details.tt  | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt
index bec2e9fad5..9912fc8f79 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt
@@ -209,10 +209,7 @@
             });
 
             $("#delete_course").click(function(){
-                [% SET count = course_reserves.size %]
-                [% UNLESS count %]
-                    [% count = 0 %]
-                [% END %]
+                [% SET count = course_reserves.size || 0 %]
                 [% IF count == 1 %]
                     return confirmDelete(_("Are you sure you want to delete this course? There is [% count %] attached item.") );
                 [% ELSIF count > 1 %]
-- 
2.11.0