Skip to content

Commit b298bb7

Browse files
Emmanuel Lacoursunnavy
authored andcommitted
Do not cast as decimal if using "LIKE" operator
Pg doesn't allow this and other databases just behave the same with or without cast.
1 parent 0779dfa commit b298bb7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/RT/SearchBuilder.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,7 @@ sub _LimitCustomField {
557557
if ( $args{'FIELD'} eq 'Content'
558558
&& blessed $cf
559559
&& $cf->IsNumeric
560+
&& $args{'OPERATOR'} !~ m/LIKE/i
560561
&& ( !$args{QUOTEVALUE} || Scalar::Util::looks_like_number($args{'VALUE'}) ) )
561562
{
562563
$args{QUOTEVALUE} = 0;

0 commit comments

Comments
 (0)