From d4d398db58e4de0a9894c64419039bb9a0d603b3 Mon Sep 17 00:00:00 2001 From: Joan Date: Tue, 14 Mar 2023 11:00:40 +0100 Subject: [PATCH] Fixed variable missing inside an IF statement --- wallamanta/wallamanta.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wallamanta/wallamanta.py b/wallamanta/wallamanta.py index 55bf779..3a7c62c 100644 --- a/wallamanta/wallamanta.py +++ b/wallamanta/wallamanta.py @@ -58,8 +58,8 @@ async def menu_click_handler(update: Update, context: CallbackContext): query = update.callback_query if query.data == 'add': valid = False + number_of_products = walladb.count_user_products(telegram_user_id) if walladb.is_user_testing(telegram_user_id): - number_of_products = walladb.count_user_products(telegram_user_id) valid = True if number_of_products >= 5: message = "Ya tienes 5 productos en seguimiento. Con premium puedes tener hasta 20."