[Bps-public-commit] r19682 - Net-Google-Code/trunk/lib/Net/Google/Code

sunnavy at bestpractical.com sunnavy at bestpractical.com
Fri May 15 02:04:10 EDT 2009


Author: sunnavy
Date: Fri May 15 02:04:10 2009
New Revision: 19682

Modified:
   Net-Google-Code/trunk/lib/Net/Google/Code/Issue.pm

Log:
do not set labels if no labels arg, so we can leave the default labels there

Modified: Net-Google-Code/trunk/lib/Net/Google/Code/Issue.pm
==============================================================================
--- Net-Google-Code/trunk/lib/Net/Google/Code/Issue.pm	(original)
+++ Net-Google-Code/trunk/lib/Net/Google/Code/Issue.pm	Fri May 15 02:04:10 2009
@@ -162,7 +162,9 @@
     }
 
     $self->mech->form_with_fields( 'comment', 'summary' );
-    $self->mech->field( 'label', $args{labels} );
+    # leave labels alone unless there're labels.
+    $self->mech->field( 'label', $args{labels} ) if $args{labels};
+
     if ( $args{files} ) {
         for ( my $i = 0; $i < scalar @{ $args{files} }; $i++ ) {
             $self->mech->field( 'file' . ($i + 1), $args{files}[$i] );
@@ -221,7 +223,9 @@
     }
 
     $self->mech->form_with_fields( 'comment', 'summary' );
-    $self->mech->field( 'label', $args{labels} );
+
+    # leave labels alone unless there're labels.
+    $self->mech->field( 'label', $args{labels} ) if $args{labels};
     if ( $args{files} ) {
         for ( my $i = 0; $i < scalar @{ $args{files} }; $i++ ) {
             $self->mech->field( 'file' . ($i + 1), $args{files}[$i] );



More information about the Bps-public-commit mailing list