Skip to content

Commit

Permalink
Omit print statement
Browse files Browse the repository at this point in the history
  • Loading branch information
sondregronas committed Oct 16, 2023
1 parent 4aefc7b commit e022c65
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions BookingSystem/teams.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import pymsteams

import inventory
from __init__ import TEAMS_WEBHOOKS, TEAMS_WEBHOOKS_DEVIATIONS
from __init__ import TEAMS_WEBHOOKS, TEAMS_WEBHOOKS_DEVIATIONS, DEBUG
from db import Settings
from sanitizer import APIException

Expand Down Expand Up @@ -101,7 +101,6 @@ def send_deviation(deviation: str) -> flask.Response: # pragma: no cover
None (sends a card asynchronously).
"""
deviation_webhooks = TEAMS_WEBHOOKS_DEVIATIONS if TEAMS_WEBHOOKS_DEVIATIONS else TEAMS_WEBHOOKS
print(deviation_webhooks)

if not deviation_webhooks:
raise APIException('Avvik ikke sendt: webhooks er ikke konfigurert', 400)
Expand All @@ -117,7 +116,8 @@ def send_deviation(deviation: str) -> flask.Response: # pragma: no cover
def send_report() -> flask.Response: # pragma: no cover
"""Send a report card to all webhooks in TEAMS_WEBHOOKS."""
# Throw exception if last report was sent less than an hour ago
last_sent_within_hour_treshold()
if not DEBUG:
last_sent_within_hour_treshold()

if not TEAMS_WEBHOOKS:
raise APIException('Rapport ikke sendt: webhooks er ikke konfigurert', 400)
Expand Down

0 comments on commit e022c65

Please sign in to comment.