bcgov / TheOrgBook

A public repository of verifiable claims about organizations. A key component of the Verifiable Organization Network.
http://von.pathfinder.gov.bc.ca
Apache License 2.0
78 stars 66 forks source link

VON-X Error posting from generated UI #645

Closed ianco closed 6 years ago

ianco commented 6 years ago

In the ESB DRS generated UI, I am getting an error posting a credential:

esbdrs-agent_1 | 2018-11-02 15:44:45,468 INFO [aiohttp.access]: 172.26.0.3 [02/Nov/2018:15:44:45 +0000] "GET /esbdrs/registration HTTP/1.1" 200 6975 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36" esbdrs-agent_1 | 2018-11-02 15:45:32,306 ERROR [aiohttp.server]: Error handling request esbdrs-agent_1 | Traceback (most recent call last): esbdrs-agent_1 | File "/home/indy/.pyenv/versions/3.6.3/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 378, in start esbdrs-agent_1 | resp = await self._request_handler(request) esbdrs-agent_1 | File "/home/indy/.pyenv/versions/3.6.3/lib/python3.6/site-packages/aiohttp/web_app.py", line 341, in _handle esbdrs-agent_1 | resp = await handler(request) esbdrs-agent_1 | File "/home/indy/.pyenv/versions/3.6.3/lib/python3.6/site-packages/vonx/web/routes.py", line 187, in _process esbdrs-agent_1 | return await process_form(form, request) esbdrs-agent_1 | File "/home/indy/.pyenv/versions/3.6.3/lib/python3.6/site-packages/vonx/web/process.py", line 104, in process_form esbdrs-agent_1 | params = load_cred_request(form, result.attr_names, inputs) esbdrs-agent_1 | File "/home/indy/.pyenv/versions/3.6.3/lib/python3.6/site-packages/vonx/web/process.py", line 40, in load_cred_request esbdrs-agent_1 | if mapping.get("fill_defaults", True): esbdrs-agent_1 | AttributeError: 'list' object has no attribute 'get'

ianco commented 6 years ago

I think this is related to posting a list (as we do through the api) vs posting a single credential.

andrewwhitehead commented 6 years ago

@ianco There's a line missing from routes.yml, it should have attributes: after mapping:.

ianco commented 6 years ago

Fix works!