更新数据截止日2025.12.14
This commit is contained in:
12
app.py
12
app.py
@@ -1,7 +1,4 @@
|
||||
from datetime import datetime, timedelta
|
||||
from typing import Any
|
||||
|
||||
import requests
|
||||
from flask import Flask, jsonify, request, render_template
|
||||
import json
|
||||
import os
|
||||
@@ -853,11 +850,12 @@ def create_qa():
|
||||
answer_ids = data.get('answer', [])
|
||||
conn = db_manager.get_connection()
|
||||
cursor = conn.cursor()
|
||||
|
||||
index_id = cursor.execute_query(f"SELECT id FROM qa order by id desc limit 1", fetch_all=False)[0]
|
||||
index_id += 1
|
||||
cursor.execute('''
|
||||
INSERT INTO qa (groupId, question, answer, start_time, end_time)
|
||||
VALUES (?, ?, ?, ?, ?)
|
||||
''', (group_id, json.dumps(question_ids), json.dumps(answer_ids),
|
||||
INSERT INTO qa ("id", "groupId", "question", "answer", "start_time", "end_time")
|
||||
VALUES (?, ?, ?, ?, ?, ?)
|
||||
''', (index_id, group_id, json.dumps(question_ids), json.dumps(answer_ids),
|
||||
data.get('start_time', ''), data.get('end_time', '')))
|
||||
|
||||
conn.commit()
|
||||
|
||||
Reference in New Issue
Block a user