From 888665629e339d9000158dd7e8fc869b054b1c0e Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Fri, 22 Aug 2008 20:38:06 +0000 Subject: [PATCH] =?utf8?q?Bug=20247936:=20Creating=20a=20product/component?= =?utf8?q?=20which=20already=20existed=20crashes=20when=20adding=20series?= =?utf8?q?=20-=20Patch=20by=20Fr=C3=83=C2=A9d=C3=83=C2=A9ric=20Buclin=20=20r/a=3Dmkanat?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Bugzilla/Series.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Bugzilla/Series.pm b/Bugzilla/Series.pm index 877f69866e..a9a37d4038 100644 --- a/Bugzilla/Series.pm +++ b/Bugzilla/Series.pm @@ -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 { -- 2.47.2