freeside/FS/FS Record.pm,1.87,1.88
ivan
ivan at pouncequick.420.am
Tue Jul 6 12:10:17 PDT 2004
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory pouncequick:/tmp/cvs-serv11901
Modified Files:
Record.pm
Log Message:
better error message for missing tables
Index: Record.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Record.pm,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -d -r1.87 -r1.88
--- Record.pm 1 Jul 2004 12:42:03 -0000 1.87
+++ Record.pm 6 Jul 2004 19:10:13 -0000 1.88
@@ -204,7 +204,10 @@
my $dbh = dbh;
my $table = $cache ? $cache->table : $stable;
- my $pkey = $dbdef->table($table)->primary_key;
+ my $dbdef_table = $dbdef->table($table)
+ or die "No schema for table $table found - ".
+ "do you need to create it or run dbdef-create?";
+ my $pkey = $dbdef_table->primary_key;
my @real_fields = grep exists($record->{$_}), real_fields($table);
my @virtual_fields = grep exists($record->{$_}), "FS::$table"->virtual_fields;
More information about the freeside-commits
mailing list