RasaHQ / financial-demo

A demo for a financial services bot
Apache License 2.0
309 stars 398 forks source link

improper handling of tracker.get_slot("amount-of-money") in validate_credit_card method #181

Open BGLouie opened 11 months ago

BGLouie commented 11 months ago

in validate_credit_card method, the amount-of-money slot may contain a number (e.g 5) or a string (e.g minimum) which is then evaluated in if amount and amount.lower() in balance_types leading to AttributeError: 'int' object has no attribute 'lower' if amount is a number. Tested with: Python 3.8.18 rasa 3.1.0 rasa-sdk 3.1.3