From 0b9aa0989ad6cfc97b4750a5c4839b232e922fa8 Mon Sep 17 00:00:00 2001 From: W1ttF Date: Thu, 13 Jun 2024 15:18:54 +0800 Subject: [PATCH] Update settings.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复使用URL获取的信息生成抢票配置时直接使用URL与项目ID比较 让ticket_id过一遍extract_id_from_url --- tab/settings.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tab/settings.py b/tab/settings.py index aaad648..d939963 100644 --- a/tab/settings.py +++ b/tab/settings.py @@ -151,6 +151,7 @@ def on_submit_all(ticket_id, ticket_info, people_indices, people_buyer_index, ad ticket_cur = ticket_value[ticket_info] people_cur = [buyer_value[item] for item in people_indices] people_buyer_cur = buyer_value[people_buyer_index] + ticket_id = extract_id_from_url(ticket_id) if str(ticket_id) != str(ticket_cur["project_id"]): return [gr.update(value="当前票信息已更改,请点击“获取票信息”按钮重新获取", visible=True), gr.update(value={})]