Prechádzať zdrojové kódy

다시 버그 수정

Surplus_Up (2DU) 6 rokov pred
rodič
commit
db7d8ff8a6
3 zmenil súbory, kde vykonal 8 pridanie a 3 odobranie
  1. 0 1
      app.py
  2. 7 1
      route/tool/func.py
  3. 1 1
      version.json

+ 0 - 1
app.py

@@ -277,7 +277,6 @@ if set_data['db_type'] == 'sqlite':
     except:
         back_time = 0
 
-    print('----')
     if back_time != 0:
         print('Back up state : ' + str(back_time) + ' hours')
 

+ 7 - 1
route/tool/func.py

@@ -1138,7 +1138,13 @@ def history_plus(title, data, date, ip, send, leng, t_check = '', d_type = ''):
     if not re.search('^user:', title):
         curs.execute(db_change("select count(*) from rc where type = 'normal'"))
         if curs.fetchall()[0][0] > 49:
-            curs.execute(db_change('delete from rc order by date asc limit 1'))
+            curs.execute(db_change("select id, title from rc where type = 'normal' order by date asc limit 1"))
+            rc_data = curs.fetchall()
+            if rc_data:
+                curs.execute(db_change('delete from rc where id = ? and title = ? and type = "normal"'), [
+                    rc_data[0][0],
+                    rc_data[0][1]
+                ])
         
         curs.execute(db_change("insert into rc (id, title, date, type) values (?, ?, ?, 'normal')"), [
             id_data,

+ 1 - 1
version.json

@@ -1,6 +1,6 @@
 {
     "master" : {
-        "r_ver" : "v3.1.9-master-15",
+        "r_ver" : "v3.1.9-master-16",
         "c_ver" : "3191301",
         "s_ver" : "8"
     }, "stable" : {