make sure user can't choose "ra" as directory name

This commit is contained in:
Son NK 2020-11-16 19:18:33 +01:00
parent 1926408a13
commit 3d153f5203
1 changed files with 2 additions and 2 deletions

View File

@ -100,9 +100,9 @@ def directory():
if Directory.get_by(name=new_dir_name):
flash(f"{new_dir_name} already added", "warning")
elif new_dir_name == "reply":
elif new_dir_name in ("reply", "ra"):
flash(
"directory name cannot be *reply*, please choose another name",
"directory name cannot be *reply* or *ra*, please choose another name",
"warning",
)
else: