summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 {