make sure keyword_notifs is not ""

pull/225/head
Aevann 2024-03-05 02:41:18 +02:00
parent 80b047411b
commit d077361cc3
1 changed files with 3 additions and 0 deletions

View File

@ -436,6 +436,9 @@ def keyword_notifs(v):
if len(keyword_notifs) > 1000:
abort(400, "Keywords are too long (max 1000 characters)")
if not keyword_notifs:
keywords_notifs = None
v.keyword_notifs = keyword_notifs
g.db.add(v)
return {"message": "Your keyword notifications have been updated!"}