X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fstemmaweb%2FController%2FRoot.pm;h=070f7d8814075c4621d02f01d3a2500a65f415a0;hb=3f7346b1ac3ccc20e75cf0c8acb9081a8f100be6;hp=c3812e784a831676f68861c7e9585ebb7c9c9687;hpb=dcd9e2a9fa590804ee1b3969faf9165fae2fcfdc;p=scpubgit%2Fstemmaweb.git diff --git a/lib/stemmaweb/Controller/Root.pm b/lib/stemmaweb/Controller/Root.pm index c3812e7..070f7d8 100644 --- a/lib/stemmaweb/Controller/Root.pm +++ b/lib/stemmaweb/Controller/Root.pm @@ -319,8 +319,8 @@ sub stemma :Local :Args(2) { try { if( $stemmaid eq 'n' ) { # We are adding a new stemma. + $stemmaid = $tradition->stemma_count; $stemma = $tradition->add_stemma( 'dot' => $dot ); - $stemmaid = $tradition->stemma_count - 1; } elsif( $stemmaid < $tradition->stemma_count ) { # We are updating an existing stemma. $stemma = $tradition->stemma( $stemmaid );