summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FS/FS/Record.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm
index 60b25edcf..437264112 100644
--- a/FS/FS/Record.pm
+++ b/FS/FS/Record.pm
@@ -240,7 +240,8 @@ sub qsearch {
}
} elsif ( $op eq '!=' ) {
if ( driver_name eq 'Pg' ) {
- if ( $dbdef->table($table)->column($column)->type =~ /(int)/i ) {
+ my $type = $dbdef->table($table)->column($column)->type;
+ if ( $type =~ /(int|serial)/i ) {
qq-( $column IS NOT NULL )-;
} else {
qq-( $column IS NOT NULL AND $column != '' )-;