From: Tara L Andrews Date: Mon, 24 Jun 2013 21:17:16 +0000 (+0200) Subject: key duplication result on new reading rather than old X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=scpubgit%2Fstemmaweb.git;a=commitdiff_plain;h=ea77ecb8864816b446be21ae0356e31523621120 key duplication result on new reading rather than old --- diff --git a/lib/stemmaweb/Controller/Relation.pm b/lib/stemmaweb/Controller/Relation.pm index 52bc5f9..7dd0c73 100644 --- a/lib/stemmaweb/Controller/Relation.pm +++ b/lib/stemmaweb/Controller/Relation.pm @@ -481,7 +481,9 @@ sub duplicate :Chained('text') :PathPart :Args(0) { $errmsg = 'Something went wrong with the request'; } if( $newrdg ) { - $response->{$reading_id} = _reading_struct( $newrdg ); + my $data = _reading_struct( $newrdg ); + $data->{'orig_rdg'} = $reading_id; + $response->{"$newrdg"} = $data; } } if( $errmsg ) {