Fix NSFW detection
This commit is contained in:
parent
57c4b6853f
commit
f76dbef82f
2
fhost.py
2
fhost.py
|
@ -295,7 +295,7 @@ class File(db.Model):
|
||||||
f.size = len(data)
|
f.size = len(data)
|
||||||
|
|
||||||
if not f.nsfw_score and app.config["NSFW_DETECT"]:
|
if not f.nsfw_score and app.config["NSFW_DETECT"]:
|
||||||
f.nsfw_score = nsfw.detect(p)
|
f.nsfw_score = nsfw.detect(str(p))
|
||||||
|
|
||||||
db.session.add(f)
|
db.session.add(f)
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
Loading…
Reference in New Issue