Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LB-436: Fix KeyError from user page #562

merged 4 commits into from Mar 23, 2019


Copy link

@paramsingh paramsingh commented Mar 19, 2019

Some code that was throwing KeyErrors. Fixed and added a test.

yearmonth = data['top_month']['month']
top_artists = data['top_month']['artists']
if 'top_month' in data:
top_artists = data['top_month']['artists']

This comment has been minimized.


alastair Mar 19, 2019

data.get('top-month', {}).get('artists', [])

@alastair alastair changed the title Fix KeyError from user page LB-436: Fix KeyError from user page Mar 21, 2019
Copy link

@alastair alastair left a comment

Looks ok.

The artists view docstring still mentions bigquery. Could be changed?

@paramsingh paramsingh merged commit 9498fc5 into metabrainz:master Mar 23, 2019
1 check was pending
1 check was pending
continuous-integration/travis-ci/pr The Travis CI build is in progress
@paramsingh paramsingh deleted the paramsingh:top-month-keyerror branch Mar 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants