[freeside-commits] branch master updated. b95c330fd8e0acde52b6743274fa003f821a84ef
Ivan
ivan at 420.am
Tue Sep 2 10:16:19 PDT 2014
The branch, master has been updated
via b95c330fd8e0acde52b6743274fa003f821a84ef (commit)
from 654cdedcfe361fc07669a5f9d1e094b8d26a4d39 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b95c330fd8e0acde52b6743274fa003f821a84ef
Author: Ivan Kohler <ivan at freeside.biz>
Date: Tue Sep 2 10:16:12 2014 -0700
fix new installs vs. FKs, RT#13971
diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm
index 2005756..8f75734 100644
--- a/FS/FS/Record.pm
+++ b/FS/FS/Record.pm
@@ -1043,7 +1043,10 @@ sub fk_methods {
my $method = '';
if ( scalar( @{$fk->columns} ) == 1 ) {
- if ( ! @{$fk->references} || $fk->columns->[0] eq $fk->references->[0] ){
+ if ( ! defined($fk->references)
+ || ! @{$fk->references}
+ || $fk->columns->[0] eq $fk->references->[0]
+ ) {
$method = $fk->table;
} else {
#some sort of hint in the table.pm or schema for methods not named
@@ -1074,7 +1077,10 @@ sub fk_methods {
my $method = '';
if ( scalar( @{$fk->columns} ) == 1 ) {
- if ( ! @{$fk->references} || $fk->columns->[0] eq $fk->references->[0] ){
+ if ( ! defined($fk->references)
+ || ! @{$fk->references}
+ || $fk->columns->[0] eq $fk->references->[0]
+ ) {
$method = $f_table;
} else {
#some sort of hint in the table.pm or schema for methods not named
-----------------------------------------------------------------------
Summary of changes:
FS/FS/Record.pm | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
More information about the freeside-commits
mailing list