Преглед на файлове

주시 목록 버그 수정

Surplus_Up (2DU) преди 6 години
родител
ревизия
abe8933863
променени са 2 файла, в които са добавени 9 реда и са изтрити 2 реда
  1. 2 0
      route/tool/func.py
  2. 7 2
      route/watch_list.py

+ 2 - 0
route/tool/func.py

@@ -942,6 +942,8 @@ def rd_plus(title, sub, date):
     else:
         curs.execute("insert into rd (title, sub, date) values (?, ?, ?)", [title, sub, date])
 
+    conn.commit()
+
 def history_plus(title, data, date, ip, send, leng, t_check = ''):
     curs.execute("select id from history where title = ? order by id + 0 desc limit 1", [title])
     id_data = curs.fetchall()

+ 7 - 2
route/watch_list.py

@@ -3,12 +3,17 @@ from .tool.func import *
 def watch_list_2(conn):
     curs = conn.cursor()
 
-    div = 'limit : 10<hr class=\"main_hr\">'
+    div = 'Limit : 10<hr class=\"main_hr\">'
     
     if custom()[2] == 0:
         return redirect('/login')
 
-    curs.execute("select title from scan where user = ?", [ip_check()])
+    ip = ip_check()
+
+    curs.execute("delete from scan where user = ? and title = ''", [ip])
+    conn.commit()
+
+    curs.execute("select title from scan where user = ?", [ip])
     data = curs.fetchall()
     for data_list in data:
         div += '<li><a href="/w/' + url_pas(data_list[0]) + '">' + data_list[0] + '</a> <a href="/watch_list/' + url_pas(data_list[0]) + '">(' + load_lang('delete') + ')</a></li>'