Merge branch 'master' of github.com:tla/stemmatology
Tara L Andrews [Tue, 11 Sep 2012 08:10:13 +0000 (10:10 +0200)]
Conflicts:
stemmaweb/lib/stemmaweb/Controller/Root.pm

lib/stemmaweb/Controller/Root.pm

index 5decf72..5ab5e92 100644 (file)
@@ -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 !~ /^\d+$/ ) {
                                        return _json_error( $c, 403, "Invalid stemma ID specification $stemmaid" );
                                } elsif( $stemmaid < $tradition->stemma_count ) {