Skip to content

Commit

Permalink
Fix for
Browse files Browse the repository at this point in the history
ERROR 2019-01-17 16:16:12,854 send_tips_for_bounty_fulfiller 31563 140151191623424 unhashable type: 'list'
Traceback (most recent call last):
  File "/home/ubuntu/gitcoin/coin/app/dashboard/management/commands/send_tips_for_bounty_fulfiller.py", line 68, in handle
    tip = assign_tip_to(tip, fulfillment.fulfiller_github_username)
  File "/home/ubuntu/gitcoin/coin/app/dashboard/management/commands/send_tips_for_bounty_fulfiller.py", line 39, in assign_tip_to
    tip.emails = get_emails_master(handle)
  File "/home/ubuntu/gitcoin/coin/app/git/utils.py", line 378, in get_emails_master
    return list(set([to_email for category, to_email in emails_by_category.items()]))
TypeError: unhashable type: 'list'
  • Loading branch information
owocki committed Jan 17, 2019
1 parent 4abad0e commit 210e4b2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/git/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,14 @@ def get_emails_by_category(username):

def get_emails_master(username):
emails_by_category = get_emails_by_category(username)
return list(set([to_email for category, to_email in emails_by_category.items()]))
emails = []
for category, to_email in emails_by_category.items():
if type(to_email) is str:
emails.append(to_email)
if type(to_email) is list:
for email in to_email:
emails.append(email)
return list(set(emails))


def search(query):
Expand Down

0 comments on commit 210e4b2

Please sign in to comment.