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
merged 4 commits into from Mar 23, 2019

Conversation

Projects
None yet
2 participants
@paramsingh
Copy link
Member

paramsingh commented Mar 19, 2019

https://tickets.metabrainz.org/browse/LB-436

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.

Copy link
@alastair

alastair Mar 19, 2019

Contributor

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

paramsingh added some commits Mar 19, 2019

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

@alastair
Copy link
Contributor

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

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

@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
You can’t perform that action at this time.