X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FRecord.pm;h=5c8a322c92af34fe9c8bdaee139a07d7efa2666e;hb=6549258cef65ee0239e052612aa99d31f8c0646c;hp=de5feeb2731a58359697fddc0b0a9bfd752f5b6e;hpb=3b0cb02522be27cea894150c3646ef03fef09e4b;p=freeside.git diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm index de5feeb27..5c8a322c9 100644 --- a/FS/FS/Record.pm +++ b/FS/FS/Record.pm @@ -903,7 +903,9 @@ sub replace { return "Records not in same table!" unless $new->table eq $old->table; my $primary_key = $old->dbdef_table->primary_key; - return "Can't change $primary_key" + return "Can't change primary key $primary_key ". + 'from '. $old->getfield($primary_key). + ' to ' . $new->getfield($primary_key) if $primary_key && ( $old->getfield($primary_key) ne $new->getfield($primary_key) );