From 2b40465ed63c08ebbd6fe0fe5444595761dc024e Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Fri, 22 Aug 2008 20:33:03 +0000 Subject: Bug 247936: Creating a product/component which already existed crashes when adding series - Patch by Frédéric Buclin r/a=mkanat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bugzilla/Series.pm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Bugzilla/Series.pm') diff --git a/Bugzilla/Series.pm b/Bugzilla/Series.pm index a4174c28d..1aaf287ce 100644 --- a/Bugzilla/Series.pm +++ b/Bugzilla/Series.pm @@ -123,6 +123,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 { -- cgit v1.2.3-24-g4f1b