diff --git a/smsauth/views.py b/smsauth/views.py index 2c4e5da..1ad2fec 100644 --- a/smsauth/views.py +++ b/smsauth/views.py @@ -39,12 +39,12 @@ def sendTelegram(text, recipient): def sendMessage(text, recipient): if recipient == BUYER: - phone = getValue("smsauth.buyer.phone", getValue("smsauth.recipient", None)) - telegram = getValue("smsauth.buyer.telegram", None) + phone = getValue("smsauth.buyer.phone", getValue("smsauth.recipient", False)) + telegram = getValue("smsauth.buyer.telegram", False) elif recipient == SELLER: - phone = getValue("smsauth.seller.phone", getValue("buyer.recipient", None)) - telegram = getValue("smsauth.seller.telegram", None) + phone = getValue("smsauth.seller.phone", getValue("buyer.recipient", False)) + telegram = getValue("smsauth.seller.telegram", False) else: raise ValueError("Invalid value for recipient: %s" % str(recipient))