Merge lp:~dobey/unity-scope-click/fix-fallback into lp:unity-scope-click/devel
Proposed by
dobey
Status: | Merged |
---|---|
Approved by: | Paweł Stołowski |
Approved revision: | 271 |
Merged at revision: | 271 |
Proposed branch: | lp:~dobey/unity-scope-click/fix-fallback |
Merge into: | lp:unity-scope-click/devel |
Diff against target: |
83 lines (+19/-6) 3 files modified
scope/click/package.cpp (+4/-1) scope/click/package.h (+3/-1) scope/tests/fake_json.h (+12/-4) |
To merge this branch: | bzr merge lp:~dobey/unity-scope-click/fix-fallback |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
Paweł Stołowski (community) | Approve | ||
Review via email: mp+220813@code.launchpad.net |
Commit message
Use the "self" sub-object for getting the resoruce url under hal+json.
Handle falling back to plain resource_url for when parsing plain json.
Description of the change
The parsing code for hal+json is currently using {"_links": {"href": "https://..."}} to get the URL, but the structure is actually {"_links": {"self": {"href": "https://..."}}} when getting hal+json from the server.
Also, we were not falling back to using "resource_url" from the plain json, and so were getting failures with the new scopes-api as we were getting an empty url for the package. We need to handle this fallback correctly here, to get a valid URL.
To post a comment you must log in.
Ah, my bad :/. Looks fine, thanks.