Merge lp:~rvb/maas/retry-bug-1398082 into lp:~maas-committers/maas/trunk
Proposed by
Raphaël Badin
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Raphaël Badin | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 3397 | ||||
Proposed branch: | lp:~rvb/maas/retry-bug-1398082 | ||||
Merge into: | lp:~maas-committers/maas/trunk | ||||
Diff against target: |
89 lines (+42/-3) 2 files modified
src/maasserver/utils/tests/test_views.py (+14/-0) src/maasserver/utils/views.py (+28/-3) |
||||
To merge this branch: | bzr merge lp:~rvb/maas/retry-bug-1398082 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Graham Binns (community) | Approve | ||
Review via email: mp+243372@code.launchpad.net |
Commit message
Fix the retry code so that it copes with API views: for these views the request is the second argument passed to the view and not the first as with UI views.
Description of the change
extract_request() is very conservative (i.e. it doesn't return the first http.HttpRequest object it finds in the arguments) because the nature and the ordering of the arguments passed to views is very well defined so I figured it would be much better to be on the safe side and raise assertion errors if we ever encounter a case we didn't plan for.
To post a comment you must log in.
LGTM. Nice to have your Django-wisdom back :)