Removed old prints, fixed return values for error

main
Anorak_1 2023-08-15 19:02:16 +02:00
parent 83142e6633
commit c578dccefb
1 changed files with 1 additions and 3 deletions

View File

@ -38,7 +38,6 @@ class StartButtonDB():
con = sqlite3.connect("applications.db") con = sqlite3.connect("applications.db")
cur = con.cursor() cur = con.cursor()
cur.execute("SELECT app_name, guild_id FROM app_start_db WHERE msg_id=?", (str(msg_id), )) cur.execute("SELECT app_name, guild_id FROM app_start_db WHERE msg_id=?", (str(msg_id), ))
#print(cur.fetchone())
app_name, guild_id = cur.fetchone() app_name, guild_id = cur.fetchone()
return app_name, guild_id return app_name, guild_id
@ -78,7 +77,6 @@ class GuildAppDB():
cur.execute("SELECT applications_blob FROM app_guildapp_db WHERE guild_id=(?)", (guild_id, )) cur.execute("SELECT applications_blob FROM app_guildapp_db WHERE guild_id=(?)", (guild_id, ))
application_blob = cur.fetchone() application_blob = cur.fetchone()
applications = pickle.loads(application_blob[0]) applications = pickle.loads(application_blob[0])
print(applications)
if application_name not in applications.keys(): if application_name not in applications.keys():
applications[application_name] = { applications[application_name] = {
"app_id": "", "app_id": "",
@ -174,7 +172,7 @@ class GuildAppDB():
questions = applications[application_name]["questions"] questions = applications[application_name]["questions"]
return questions, len(questions) return questions, len(questions)
else: else:
return "error on get questions: application not found" return "error on get questions: application not found", ""
def edit_question(guild_id: str, application_name: str, question_index: int, new_question: str): def edit_question(guild_id: str, application_name: str, question_index: int, new_question: str):
con = sqlite3.connect("applications.db") con = sqlite3.connect("applications.db")