Skip to content

Commit 64350ed

Browse files
committed
fix target destinations with callback data and with deleting states p.2
1 parent 6c7623c commit 64350ed

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

handlers/users/view_ques_handler.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,7 @@ async def like_questionnaire(call: CallbackQuery, state: FSMContext, callback_da
7474
@dp.callback_query_handler(action_reciprocity_keyboard.filter(action=["like_reciprocity", "dislike_reciprocity"]))
7575
async def like_questionnaire_reciprocity(call: CallbackQuery, state: FSMContext, callback_data: typing.Dict[str, str]):
7676
user_list = await find_user_gender(call.from_user.id)
77-
random_user = None
78-
try:
79-
random_user = random.choice(user_list)
80-
except Exception as err:
81-
logger.error(err)
82-
await call.message.delete()
83-
await call.answer(text="Для вас кончились анкеты!", show_alert=True)
84-
8577
action = callback_data['action']
86-
87-
await state.update_data(data={'questionnaire_owner': random_user})
8878
username = call.from_user.username
8979
if action == "like_reciprocity":
9080
user_for_like = callback_data["user_for_like"]

0 commit comments

Comments
 (0)