Skip to content

Commit

Permalink
fix(account): fix slurs validator triggering when no bad words list h…
Browse files Browse the repository at this point in the history
…as been created
  • Loading branch information
corp-0 committed Jan 11, 2021
1 parent 3eb2414 commit 0620c7a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/account/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def generate_bad_words_regex(self):
bad_list = f.readlines()
except FileNotFoundError:
self.regex = None
self.inverse_match = False
return
bad_list = [w.replace("\n", "").strip() for w in bad_list]
self.regex = re.compile(formatted_regex.format("|".join(bad_list)), self.flags)

0 comments on commit 0620c7a

Please sign in to comment.