Skip to content

Commit

Permalink
Fix assemble_leaderboard
Browse files Browse the repository at this point in the history
  • Loading branch information
mbeacom committed Oct 4, 2018
1 parent 83e208a commit 1378743
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/marketing/management/commands/assemble_leaderboards.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,27 +96,27 @@ def tip_to_location(tip):


def tip_to_country(tip):
return list(set([ele['country_name'] for ele in tip_to_location(tip) if ele and ele['country_name']]))
return list(set(ele['country_name'] for ele in tip_to_location(tip) if ele and ele.get('country_name')))


def bounty_to_country(bounty):
return list(set([ele['country_name'] for ele in bounty_to_location(bounty) if ele and ele['country_name']]))
return list(set(ele['country_name'] for ele in bounty_to_location(bounty) if ele and ele.get('country_name')))


def tip_to_continent(tip):
return list(set([ele['continent_name'] for ele in tip_to_location(tip) if ele and ele['continent_name']]))
return list(set(ele['continent_name'] for ele in tip_to_location(tip) if ele and ele.get('continent_name')))


def bounty_to_continent(bounty):
return list(set([ele['continent_name'] for ele in bounty_to_location(bounty) if ele and ele['continent_name']]))
return list(set(ele['continent_name'] for ele in bounty_to_location(bounty) if ele and ele.get('continent_name')))


def tip_to_city(tip):
return list(set([ele['city'] for ele in tip_to_location(tip) if ele and ele['city']]))
return list(set(ele['city'] for ele in tip_to_location(tip) if ele and ele.get('city')))


def bounty_to_city(bounty):
return list(set([ele['city'] for ele in bounty_to_location(bounty) if ele and ele['city']]))
return list(set(ele['city'] for ele in bounty_to_location(bounty) if ele and ele.get('city')))


def bounty_index_terms(bounty):
Expand Down

0 comments on commit 1378743

Please sign in to comment.