]> 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:38:06 +0000 (20:38 +0000)
committerlpsolit%gmail.com <>
Fri, 22 Aug 2008 20:38:06 +0000 (20:38 +0000)
Bugzilla/Series.pm

index 877f69866e1ad07b9a93aa03c6508b6d60a1b1de..a9a37d4038a46400c3fb91e75f06379c38ff087b 100644 (file)
@@ -125,6 +125,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 {