Merge lp://staging/~edwin-grubbs/launchpad/bug-555734-coc-oops into lp://staging/launchpad

Proposed by Edwin Grubbs
Status: Merged
Approved by: Aaron Bentley
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp://staging/~edwin-grubbs/launchpad/bug-555734-coc-oops
Merge into: lp://staging/launchpad
Diff against target: 155 lines (+84/-14)
2 files modified
lib/lp/registry/browser/tests/coc-views.txt (+67/-0)
lib/lp/registry/templates/codeofconduct-list.pt (+17/-14)
To merge this branch: bzr merge lp://staging/~edwin-grubbs/launchpad/bug-555734-coc-oops
Reviewer Review Type Date Requested Status
Aaron Bentley (community) Approve
Canonical Launchpad Engineering code Pending
Review via email: mp+23268@code.staging.launchpad.net

Commit message

Fix oops on /codeofconduct page when a user has a gpg key but has not signed the CoC.

Description of the change

Summary
-------

Fixed bug where a template tried to access to user/gpg_keys
attribute as user/gpgkeys. I changed the template variable to
gpg_keys to make it more consistent with user/gpg_keys.

Tests
-----

./bin/test -vv -t coc-views.txt

Demo and Q/A
------------

* Run this sql to add a gpg key, since the bug only occured when
  a user had a gpg key but had not signed the CoC yet.

  INSERT INTO gpgkey (
        owner, keyid, fingerprint, active, algorithm, keysize)
  SELECT
    52,
    keyid,
    'ABCDEF0123456789ABCDDCBA0000111112345670',
    active,
    algorithm,
    keysize
  FROM gpgkey
  WHERE id = 1;

* Open http://launchpad.dev/codeofcontact
  * Log in as <email address hidden>
  * You should no longer get an oops.

To post a comment you must log in.
Revision history for this message
Aaron Bentley (abentley) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.