From 26b9f3204754be7b522e100b03ea4b6cfadd1693 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Fri, 4 Nov 2016 13:06:38 +0100 Subject: [PATCH] SL::DB::Manager: find_by_or_create bubbelt jetzt exceptions --- SL/DB/Helper/Manager.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SL/DB/Helper/Manager.pm b/SL/DB/Helper/Manager.pm index b4d66da42..d456e76b0 100644 --- a/SL/DB/Helper/Manager.pm +++ b/SL/DB/Helper/Manager.pm @@ -22,7 +22,10 @@ sub find_by_or_create { my $class = shift; my $found; - eval { $found = $class->find_by(@_); }; + eval { + $found = $class->find_by(@_); + 1; + } or die $@; return defined $found ? $found : $class->object_class->new; } -- 2.20.1