Cannot view code_review_vote_reference collection contents when logged in anonymously
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Low
|
Colin Watson |
Bug Description
$ python3
Python 3.5.2 (default, Nov 23 2017, 16:37:01)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import launchpadlib.
>>> lp = launchpadlib.
... 'git-ubuntu-
... )
>>> mp = lp.load('https:/
>>> len(mp.votes)
3
>>> list(mp.votes)
[]
>>> mp.votes[0]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/
raise IndexError("list index out of range")
IndexError: list index out of range
>>>
Expected: stuff in list(mp.votes). Actual: empty, even though len(mp.votes) shows that entries exist.
Workaround: log in. Using launchpadlib.
<cjwatson> it'll be in the security adapter for CRVRs in lib/lp/sevurity.py, probably
<cjwatson> security.py
Related branches
- William Grant: Approve (code)
-
Diff: 77 lines (+37/-1)2 files modifiedlib/lp/code/model/tests/test_codereviewvote.py (+28/-1)
lib/lp/security.py (+9/-0)
Changed in launchpad: | |
status: | New → In Progress |
importance: | Undecided → Low |
assignee: | nobody → Colin Watson (cjwatson) |
tags: |
added: qa-ok removed: qa-needstesting |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
Fixed in stable r18784 <http:// bazaar. launchpad. net/~launchpad- pqm/launchpad/ stable/ revision/ 18784>.