Commit a500546a authored by Daniel W Bond's avatar Daniel W Bond

left out an 's' and a '== 0'

parent ae185ce5
...@@ -92,7 +92,7 @@ def create_user(tree): ...@@ -92,7 +92,7 @@ def create_user(tree):
# notify developers of user signup milestones # notify developers of user signup milestones
num_users = User.objects.all().count() num_users = User.objects.all().count()
if num_users % 50: if num_users % 50 == 0:
message = "Congratulations! We've passed %d user registrations!" % num_users message = "Congratulations! We've passed %d user registrations!" % num_users
slack_post(text=message, slack_post(text=message,
channel='#roomlist', channel='#roomlist',
......
...@@ -15,7 +15,7 @@ def slack_post(text, channel, username, icon_emoji): ...@@ -15,7 +15,7 @@ def slack_post(text, channel, username, icon_emoji):
r = requests.post(webhook_url, data=json.dumps(payload)) r = requests.post(webhook_url, data=json.dumps(payload))
r.raise_for_status() r.raise_for_status()
print(r.status_code) print(r.status_code)
except request.exceptions.RequestException as e: except requests.exceptions.RequestException as e:
print("Error posting to Slack:", e) print("Error posting to Slack:", e)
# Examples # Examples
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment