summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2003-11-04 10:55:42 +0000
committerivan <ivan>2003-11-04 10:55:42 +0000
commit39e40f004fb217f825f695276d7a1b5a29a821d8 (patch)
tree93706fef76f41b47fe4057f7788c0a7d914eef6a
parent47c39af359fc93c777714a5c50a6183747b66da9 (diff)
treat serial columns as ints too!
-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 != '' )-;