Ver Fonte

fix test

잉여개발기 (SPDV) há 2 anos atrás
pai
commit
c218b476fa
2 ficheiros alterados com 2 adições e 4 exclusões
  1. 1 1
      route/main_func_error_404.py
  2. 1 3
      route/topic.py

+ 1 - 1
route/main_func_error_404.py

@@ -11,4 +11,4 @@ def main_func_error_404(e = ''):
             db_data = curs.fetchall()
             db_data = db_data[0][0] if db_data and db_data[0][0] != '' else 'FrontPage'
             
-            return '<script>window.location.href = "/w/' + url_pas(db_data) + '";</script>'
+            return redirect('/w/' + url_pas(db_data))

+ 1 - 3
route/topic.py

@@ -123,9 +123,7 @@ def topic(topic_num = 0, do_type = '', doc_name = 'Test'):
             name_display = 'display: none;' if topic_num != '0' else ''
 
             shortcut = '<div class="opennamu_thread_shortcut" id="thread_shortcut">'
-            curs.execute(db_change(
-                "select id from topic where code = ? order by id + 0 asc"
-            ), [topic_num])
+            curs.execute(db_change("select id from topic where code = ? order by id + 0 asc"), [topic_num])
             db_data = curs.fetchall()
             for for_a in db_data:
                 shortcut += '<a href="#' + for_a[0] + '">#' + for_a[0] + '</a> '