From 519246ee6b6b540c068db2425236c7970660f682 Mon Sep 17 00:00:00 2001
From: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Date: Thu, 5 Mar 2015 12:18:09 +0100
Subject: [PATCH] Bug 12344: QA followup: use next instead of return

Use next instead of return when generating templates.
In case patron has enabled a message type that misses a template,
next message type will be attempted instead of returning at once.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
---
 C4/Circulation.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/C4/Circulation.pm b/C4/Circulation.pm
index 9f7a93f..9cae590 100644
--- a/C4/Circulation.pm
+++ b/C4/Circulation.pm
@@ -3273,7 +3273,7 @@ sub SendCirculationAlert {
                     'borrowers'   => $borrower,
                     'branches'    => $branch,
                 }
-            ) or return;
+            ) or next;
             C4::Message->enqueue($letter, $borrower, $_);
         } else {
             #warn "append to old message";
@@ -3290,7 +3290,7 @@ sub SendCirculationAlert {
                     'borrowers'   => $borrower,
                     'branches'    => $branch,
                 }
-            ) or return;
+            ) or next;
             $message->append($letter);
             $message->update;
         }
-- 
2.1.0