X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Freason.pm;h=9c34dd98a0d4bf7ffc36db6d5a52b86905587931;hb=467dfa2d10e8e54bb162554c8f11dca65ec5b565;hp=864804d265d7f6217a435e652c03aee9e427b711;hpb=3ece1c396f23e04cd659f1085f6eeee8bdfd846f;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;