Выходит такая ошибка когда одновременно нажимаю на inline кнопку вот код
if '21' not in mas_data_time:
await bot.edit_message_reply_markup(call.message.chat.id, call.message.message_id)
ass = 'Картой'
conn_price_card = sqlite3.connect("Drive_in.db") # или :memory: чтобы сохранить в RAM
result_last_card = conn_price_card.execute(
f"""SELECT count FROM {user_id_start} WHERE id == 1""").fetchall()
for back_elem_card in result_last_card:
mazafaka_card = back_elem_card[0]
curr_Devit_pm.execute(f"UPDATE {user_id_start} SET oplata = '" + str(ass) + "' WHERE id =" + str(mazafaka_card))
Deveti_pm = curr_Devit_pm.execute(f"""SELECT * FROM {user_id_start}""").fetchall()
# Вывод результатов на экран
count_back_rr = 1
for Devet_pm in Deveti_pm:
await bot.send_message(call.from_user.id, str(count_back_rr) + ') ' + str(Devet_pm[7]))
abc = 1
table = 'Orders'
table_data = 'data_time'
a = '21'
curr_Devit_pm.execute(
f"""INSERT INTO {table} (name, user_name, shop, phone, price, bazar_tovar, oplata, clock) VALUES(?, ?, ?, ?, ?, ?, ?, ?)""",
(Devet_pm[3], Devet_pm[4], Devet_pm[5], Devet_pm[6], Devet_pm[7], Devet_pm[2], Devet_pm[11],
a))
curr_Devit_pm.execute(f"""DELETE FROM {user_id_start} WHERE id > 1""")
curr_Devit_pm.execute(f"UPDATE {user_id_start} SET count = '" + str(1) + "' WHERE id =" + str(1))
curr_Devit_pm.execute(f"UPDATE {user_id_start} SET location = '" + str(0) + "' WHERE id =" + str(1))
curr_Devit_pm.execute(f"""INSERT INTO {table_data} (clock) VALUES(?)""",
(a,))
con_Devit_pm.commit()
else:
await bot.send_message(call.message.chat.id, 'Это время уже забронированно выберите другое :(')