Skip to content

Commit

Permalink
style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
darkdarkdragon committed Apr 21, 2018
1 parent 256c897 commit 25d6018
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/dashboard/notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ def maybe_market_to_slack(bounty, event_name):
return False
return True


def build_message_for_slack(bounty, event_name):
conv_details = ""
usdt_details = ""
Expand All @@ -202,6 +203,7 @@ def build_message_for_slack(bounty, event_name):
f"{bounty.token_name}: {title} \n\n{bounty.get_absolute_url()}"
return msg


def maybe_market_to_user_slack(bounty, event_name):
"""Send a Slack message to the user's slack channel for the specified Bounty.
Expand Down Expand Up @@ -230,7 +232,7 @@ def maybe_market_to_user_slack(bounty, event_name):
try:
username = uri_array[1]
repo = uri_array[2]
subscribers = EmailSubscriber.objects.filter(profile__handle=username, repos__contains=[repo]).exclude(slack_token='', slack_channel='')
subscribers = EmailSubscriber.objects.filter(profile__handle=username, repos__contains=[repo])
subscribers = subscribers & EmailSubscriber.objects.exclude(slack_token='', slack_channel='')
for subscriber in subscribers:
try:
Expand Down
3 changes: 2 additions & 1 deletion app/marketing/migrations/0022_auto_20180419_1517.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='emailsubscriber',
name='repos',
field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=200), blank=True, default=[], size=None),
field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=200), blank=True,
default=[], size=None),
),
migrations.AddField(
model_name='emailsubscriber',
Expand Down
1 change: 1 addition & 0 deletions app/marketing/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,7 @@ def email_settings(request, key):
}
return TemplateResponse(request, 'settings/email.html', context)


def slack_settings(request):

# setup
Expand Down

0 comments on commit 25d6018

Please sign in to comment.