From: Sven Schöling Date: Fri, 4 Nov 2016 12:06:38 +0000 (+0100) Subject: SL::DB::Manager: find_by_or_create bubbelt jetzt exceptions X-Git-Tag: release-3.5.4~1937 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=26b9f3204754be7b522e100b03ea4b6cfadd1693;p=kivitendo-erp.git SL::DB::Manager: find_by_or_create bubbelt jetzt exceptions --- 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; }