summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FS/FS/Record.pm4
1 files changed, 3 insertions, 1 deletions
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) );