Replace None by False to fix dbsettings behavior

This commit is contained in:
Kumi 2021-02-06 12:02:29 +00:00
parent 39901cd15f
commit d6b7748245

View file

@ -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))