async def count_registration_status():
_session_maker: sessionmaker = session_maker
async with _session_maker() as session:
async with session.begin():
result = await session.execute(func.count(User).filter(User.registration_status.like('Зарегистрирован')))
return result.scalar()
sqlalchemy.exc.ArgumentError: SQL expression element expected, got .
@router.callback_query(Text(text='okay_but_pressed'), ~IsStatus(status_member_list))
async def show_menu(callback: CallbackQuery):
name_user = await read_name(callback.from_user.id)
await callback.message.answer_photo(photo=file_id[0],
caption=f"Привет, {name_user[0]}"
f"\n\n{USER_LEXICON['greetings']}",
reply_markup=menu_kb)