Code review comment for lp:~bac/launchpad/bug-266890

Revision history for this message
Brad Crittenden (bac) wrote :

= Summary =

Setting private bugs on the +review-license page for a project with no
bug supervisor set causes an OOPS due to a db constraint.

== Proposed fix ==

Add a test in the form validation to flag the attempt to set private
bugs. I found that the +admin page already does the same thing so the
code was refactored.

== Pre-implementation notes ==

None

== Implementation details ==

As above.

== Tests ==

bin/test -vvt product-views.txt

== Demo and Q/A ==

As mark, go to https://launchpad.dev/firefox/+review-license and turn on
private bugs. Note the nice error message.

= Launchpad lint =

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  lib/lp/registry/browser/product.py
  lib/lp/registry/browser/tests/product-views.txt

== Pylint notices ==

lib/lp/registry/browser/product.py
    54: [F0401] Unable to import 'lazr.delegates' (No module named
delegates)

« Back to merge proposal