diff --git a/tcms/testplans/views.py b/tcms/testplans/views.py index 8557b7d323..3cc217f5f9 100644 --- a/tcms/testplans/views.py +++ b/tcms/testplans/views.py @@ -208,7 +208,8 @@ def get_context_data(self, **kwargs): def get_form(self, form_class=None): form = super().get_form(form_class) - form.populate(self.object.product_id) + product_id = self.request.POST.get("product", self.object.product_id) + form.populate(product_pk=product_id) return form def get_form_kwargs(self):