Skip to content

Commit

Permalink
fix for DoesNotExist: User matching query does not exist., https://se…
Browse files Browse the repository at this point in the history
  • Loading branch information
owocki committed Jan 28, 2019
1 parent f000209 commit 915c93e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions app/inbox/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def create_notification(sender, **kwargs):
bounty = activity.bounty
send_notification_to_user(
activity.profile.user,
get_user_model().objects.get(username=bounty.bounty_owner_github_username),
get_user_model().objects.get(username__iexact=bounty.bounty_owner_github_username),
bounty.url,
'worker_applied',
f'<b>{activity.profile.user} applied</b> to work on {bounty.title}'
Expand All @@ -51,7 +51,7 @@ def create_notification(sender, **kwargs):
bounty = activity.bounty
send_notification_to_user(
activity.profile.user,
get_user_model().objects.get(username=activity.metadata['worker_handle']),
get_user_model().objects.get(username__iexact=activity.metadata['worker_handle']),
bounty.url,
'worker_approved',
f'You have been <b>approved to work on {bounty.title}</b>'
Expand All @@ -61,7 +61,7 @@ def create_notification(sender, **kwargs):
bounty = activity.bounty
send_notification_to_user(
activity.profile.user,
get_user_model().objects.get(username=activity.metadata['worker_handle']),
get_user_model().objects.get(username__iexact=activity.metadata['worker_handle']),
bounty.url,
'worker_rejected',
f'Your request to work on <b>{bounty.title} has been rejected</b>'
Expand All @@ -71,7 +71,7 @@ def create_notification(sender, **kwargs):
bounty = activity.bounty
send_notification_to_user(
activity.profile.user,
get_user_model().objects.get(username=bounty.bounty_owner_github_username),
get_user_model().objects.get(username__iexact=bounty.bounty_owner_github_username),
bounty.url,
'start_work',
f'<b>{activity.profile.user} has started work</b> on {bounty.title}'
Expand All @@ -81,7 +81,7 @@ def create_notification(sender, **kwargs):
bounty = activity.bounty
send_notification_to_user(
activity.profile.user,
get_user_model().objects.get(username=bounty.bounty_owner_github_username),
get_user_model().objects.get(username__iexact=bounty.bounty_owner_github_username),
bounty.url,
'work_submitted',
f'<b>{activity.profile.user} has submitted work</b> for {bounty.title}'
Expand All @@ -91,7 +91,7 @@ def create_notification(sender, **kwargs):
bounty = activity.bounty
amount_paid = activity.metadata['new_bounty']['value_in_usdt_now']
send_notification_to_user(
get_user_model().objects.get(username=bounty.bounty_owner_github_username),
get_user_model().objects.get(username__iexact=bounty.bounty_owner_github_username),
activity.profile.user,
bounty.url,
'work_done',
Expand All @@ -103,7 +103,7 @@ def create_notification(sender, **kwargs):
bounty = activity.bounty
send_notification_to_user(
activity.profile.user,
get_user_model().objects.get(username=bounty.bounty_owner_github_username),
get_user_model().objects.get(username__iexact=bounty.bounty_owner_github_username),
bounty.url,
'stop_work',
f'<b>{activity.profile.user} has stopped work</b> on {bounty.title}'
Expand All @@ -114,7 +114,7 @@ def create_notification(sender, **kwargs):
amount = activity.metadata['value_in_usdt_now']
send_notification_to_user(
activity.profile.user,
get_user_model().objects.get(username=bounty.bounty_owner_github_username),
get_user_model().objects.get(username__iexact=bounty.bounty_owner_github_username),
bounty.url,
'new_crowdfund',
f'A <b>crowdfunding contribution worth {amount} USD</b> has been attached for {bounty.title}'
Expand Down

0 comments on commit 915c93e

Please sign in to comment.