forked from rDrama/rDrama
1
0
Fork 0

fix old mentions

master
Aevann1 2022-12-16 19:47:36 +02:00
parent f1eeb9acc9
commit 8660fcaa2e
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ my = re.compile('.*?(src="/uid/([a-zA-Z]+)/pic/profile").*?', flags=re.I)
@app.get('/admin/fix')
@admin_level_required(3)
def fix_36(v):
comments = g.db.query(Submission).filter(Submission.body_html.op("SIMILAR TO")('%src="/uid/[a-zA-Z]+/pic/profile"%')).all()
comments = g.db.query(Comment).filter(Comment.body_html.op("SIMILAR TO")('%src="/uid/[a-zA-Z]+/pic/profile"%')).all()
for c in comments:
print(c.id, flush=True)
for i in my.finditer(c.body_html):