diff --git a/files/routes/admin.py b/files/routes/admin.py index a2284845d..432e82f5f 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -155,14 +155,32 @@ def move_acc(v:User, new_id, old_id): g.db.add(newuser) - update_statement = f'''update submissions set body_html=replace(body_html, '', '') where body_html like '%%'; - update comments set body_html=replace(body_html, '', '') where body_html like '%%'; - update subs set sidebar_html=replace(sidebar_html, '', '') where sidebar_html like '%%'; - update users set bio_html=replace(bio_html, '', '') where bio_html like '%%'; - update users set sig_html=replace(sig_html, '', '') where sig_html like '%%'; - update users set friends_html=replace(friends_html, '', '') where friends_html like '%%'; - update users set enemies_html=replace(enemies_html, '', '') where enemies_html like '%%'; + update_statement = f''' + update submissions set body_html=replace(body_html, '', '') where body_html like '%%'; + update comments set body_html=replace(body_html, '', '') where body_html like '%%'; + update subs set sidebar_html=replace(sidebar_html, '', '') where sidebar_html like '%%'; + update users set bio_html=replace(bio_html, '', '') where bio_html like '%%'; + update users set sig_html=replace(sig_html, '', '') where sig_html like '%%'; + update users set friends_html=replace(friends_html, '', '') where friends_html like '%%'; + update users set enemies_html=replace(enemies_html, '', '') where enemies_html like '%%'; + + update submissions set body_html=replace(body_html, '', '') where body_html like '%%'; + update comments set body_html=replace(body_html, '', '') where body_html like '%%'; + update subs set sidebar_html=replace(sidebar_html, '', '') where sidebar_html like '%%'; + update users set bio_html=replace(bio_html, '', '') where bio_html like '%%'; + update users set sig_html=replace(sig_html, '', '') where sig_html like '%%'; + update users set friends_html=replace(friends_html, '', '') where friends_html like '%%'; + update users set enemies_html=replace(enemies_html, '', '') where enemies_html like '%%'; + + update submissions set body_html=replace(body_html, '', '') where body_html like '%%'; + update comments set body_html=replace(body_html, '', '') where body_html like '%%'; + update subs set sidebar_html=replace(sidebar_html, '', '') where sidebar_html like '%%'; + update users set bio_html=replace(bio_html, '', '') where bio_html like '%%'; + update users set sig_html=replace(sig_html, '', '') where sig_html like '%%'; + update users set friends_html=replace(friends_html, '', '') where friends_html like '%%'; + update users set enemies_html=replace(enemies_html, '', '') where enemies_html like '%%'; ''' + g.db.execute(update_statement) g.db.delete(olduser) @@ -175,7 +193,7 @@ def move_acc(v:User, new_id, old_id): cache.set(f'{SITE}_stats', stats) cache.set(CHAT_ONLINE_CACHE_KEY, online) - return redirect(f"/id/{old_id}") + return redirect(f"/@{olduser.username}")