Ensure get_current_provider only returns active

This commit is contained in:
Imdad Ahad
2017-04-24 14:48:06 +01:00
parent 8712b6aa03
commit ce2401c6e0
2 changed files with 11 additions and 1 deletions

View File

@@ -36,7 +36,8 @@ def get_alternative_sms_provider(identifier):
def get_current_provider(notification_type):
return ProviderDetails.query.filter_by(
notification_type=notification_type
notification_type=notification_type,
active=True
).order_by(
asc(ProviderDetails.priority)
).first()