summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2008-08-22 22:33:03 +0200
committerlpsolit%gmail.com <>2008-08-22 22:33:03 +0200
commit2b40465ed63c08ebbd6fe0fe5444595761dc024e (patch)
treea68daf89a3b2388c0d89fc59713e45093d3709d0 /Bugzilla
parent5187c079d76bf2af6bd86f7c82c17fe7eb279ee9 (diff)
downloadbugzilla-2b40465ed63c08ebbd6fe0fe5444595761dc024e.tar.gz
bugzilla-2b40465ed63c08ebbd6fe0fe5444595761dc024e.tar.xz
Bug 247936: Creating a product/component which already existed crashes when adding series - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Series.pm4
1 files changed, 4 insertions, 0 deletions
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 {