properly handle errors from multiple process_o2m/m2m actions, #33490
authorMark Wells <mark@freeside.biz>
Thu, 12 Feb 2015 06:59:31 +0000 (22:59 -0800)
committerMark Wells <mark@freeside.biz>
Thu, 12 Feb 2015 06:59:31 +0000 (22:59 -0800)
httemplate/edit/process/elements/process.html

index eba0304..69bd605 100644 (file)
@@ -315,7 +315,7 @@ foreach my $value ( @values ) {
       warn "$me processing m2m:\n". Dumper( %$process_m2m )
         if $opt{'debug'};
 
-      $error = $new->process_m2m( %$process_m2m );
+      $error ||= $new->process_m2m( %$process_m2m );
     }
 
   }
@@ -357,7 +357,7 @@ foreach my $value ( @values ) {
                                                );
       }
 
-      $error = $new->process_o2m( %{ $process_o2m },
+      $error ||= $new->process_o2m( %{ $process_o2m },
                                      'params' => scalar($cgi->Vars),
                                    );
     }