forked from rDrama/rDrama
1
0
Fork 0

fix 500 err

master
Aevann 2024-06-08 17:19:19 +03:00
parent 49c1cfa57b
commit 2d28414d74
1 changed files with 3 additions and 3 deletions

View File

@ -404,15 +404,15 @@ def settings_personal_post(v):
def filters(v):
filters = request.values.get("filters", "").strip()
if len(filters) > 1000:
abort(400, "Filters are too long (max 1000 characters)")
if filters in {"", "None"}:
filters = None
if filters == v.custom_filter_list:
abort(400, "You didn't change anything!")
if len(filters) > 1000:
abort(400, "Filters are too long (max 1000 characters)")
v.custom_filter_list = filters
g.db.add(v)
return {"message": "Your custom filters have been updated!"}