summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2003-11-04 10:55:44 +0000
committerivan <ivan>2003-11-04 10:55:44 +0000
commit721f9eb78e758e2b695cc4f4ec888b67c20c9bb5 (patch)
tree2aafd0d37fb31c19552cdefb5c42e69fb363b2ab
parenta237d07ba60588f45047e5d0f7950a5f678a7fdf (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 83f1c540c..1f9bd5c87 100644
--- a/FS/FS/Record.pm
+++ b/FS/FS/Record.pm
@@ -235,7 +235,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 != '' )-;