]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 247936: Creating a product/component which already existed crashes when adding...
authorlpsolit%gmail.com <>
Fri, 22 Aug 2008 20:36:22 +0000 (20:36 +0000)
committerlpsolit%gmail.com <>
Fri, 22 Aug 2008 20:36:22 +0000 (20:36 +0000)
Bugzilla/Series.pm

index a99c442fe7e0a10038257abdd46df45beab5a132..95d0a8f50de4e1af7e6561155d732b0c4a0f876f 100644 (file)
@@ -124,6 +124,10 @@ sub initFromParameters {
     ($self->{'series_id'}, $self->{'category'},  $self->{'subcategory'},
      $self->{'name'}, $self->{'creator'}, $self->{'frequency'},
      $self->{'query'}, $self->{'public'}) = @_;
+
+    # If the first parameter is undefined, check if this series already
+    # exists and update it series_id accordingly
+    $self->{'series_id'} ||= $self->existsInDatabase();
 }
 
 sub initFromCGI {