فهرست منبع

원인 임시 수리

https://github.com/openNAMU/openNAMU/issues/1827
잉여개발기 (SPDV) 2 سال پیش
والد
کامیت
3e517cf2e7
3فایلهای تغییر یافته به همراه9 افزوده شده و 7 حذف شده
  1. 6 5
      route/edit.py
  2. 1 0
      route/main_setting_skin_set.py
  3. 2 2
      route/vote_select.py

+ 6 - 5
route/edit.py

@@ -1,11 +1,12 @@
 from .tool.func import *
 
 def edit_render_set(name, content):
-    render_set(
-        doc_name = name,
-        doc_data = content,
-        data_in = ''
-    )
+    with get_db_connect() as conn:
+        render_set(
+            doc_name = name,
+            doc_data = content,
+            data_in = ''
+        )
 
 # https://stackoverflow.com/questions/13821156/timeout-function-using-threading-in-python-does-not-work
 def edit_timeout(func, args = (), timeout = 3):

+ 1 - 0
route/main_setting_skin_set.py

@@ -1,4 +1,5 @@
 from .tool.func import *
+
 from .user_setting_skin_set_main import user_setting_skin_set_main_set_list
 
 def main_setting_skin_set():

+ 2 - 2
route/vote_select.py

@@ -1,10 +1,10 @@
 from .tool.func import *
 
 def vote_select(num = 1):
-    num = str(num)
-    
     with get_db_connect() as conn:
         curs = conn.cursor()
+        
+        num = str(num)
 
         curs.execute(db_change('select name, subject, data, type from vote where id = ? and user = ""'), [num])
         data_list = curs.fetchall()