X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Freason.pm;h=9c34dd98a0d4bf7ffc36db6d5a52b86905587931;hb=81bad22dc70a9277331d2d15ff25810f615c4a92;hp=864804d265d7f6217a435e652c03aee9e427b711;hpb=2073798304acbd9402f73e0dee7507a7a4d22ceb;p=freeside.git diff --git a/FS/FS/reason.pm b/FS/FS/reason.pm index 864804d26..9c34dd98a 100644 --- a/FS/FS/reason.pm +++ b/FS/FS/reason.pm @@ -174,7 +174,7 @@ sub new_or_existing { } } else { my %hash = ('class' => $opt{'class'}, 'type' => $opt{'type'}); - my $reason_type = qsearchs('reason_type', \%hash) + $reason_type = qsearchs('reason_type', \%hash) || FS::reason_type->new(\%hash); $error = $reason_type->insert unless $reason_type->typenum;