Aevann 2024-05-24 01:54:30 +03:00
parent 21f08b9826
commit 4da8250ad2
2 changed files with 6 additions and 0 deletions

View File

@ -404,6 +404,9 @@ def settings_personal_post(v):
def filters(v): def filters(v):
filters = request.values.get("filters", "").strip() filters = request.values.get("filters", "").strip()
if filters in {"", "None"}:
filters = None
if filters == v.custom_filter_list: if filters == v.custom_filter_list:
abort(400, "You didn't change anything!") abort(400, "You didn't change anything!")

View File

@ -0,0 +1,3 @@
alter table users alter column custom_filter_list drop default;
update users set custom_filter_list=null where custom_filter_list = '';
update users set custom_filter_list=null where custom_filter_list = 'None';