From fb33bc671287318fe0243cca2c96f7f7d0a60407 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Fri, 22 Aug 2008 20:36:22 +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 a99c442fe7..95d0a8f50d 100644 --- a/Bugzilla/Series.pm +++ b/Bugzilla/Series.pm @@ -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 { -- 2.47.2