Merge lp:~edwin-grubbs/launchpad/bug-555734-coc-oops into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Aaron Bentley | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | not available | ||||
Proposed branch: | lp:~edwin-grubbs/launchpad/bug-555734-coc-oops | ||||
Merge into: | lp: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:~edwin-grubbs/launchpad/bug-555734-coc-oops | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Aaron Bentley (community) | Approve | ||
Canonical Launchpad Engineering | code | Pending | |
Review via email: mp+23268@code.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,
'ABCDEF0123
active,
algorithm,
keysize
FROM gpgkey
WHERE id = 1;
* Open http://
* Log in as <email address hidden>
* You should no longer get an oops.