mirror of
https://github.com/YunoHost-Apps/ihatemoney_ynh.git
synced 2024-09-03 19:26:15 +02:00
Fix #118 : Create a new project with the name "dashboard" should raise an exception
This commit is contained in:
parent
7b338a2a14
commit
4f4439eec9
1 changed files with 1 additions and 1 deletions
|
@ -88,7 +88,7 @@ class ProjectForm(EditProjectForm):
|
|||
|
||||
def validate_id(form, field):
|
||||
form.id.data = slugify(field.data)
|
||||
if Project.query.get(form.id.data):
|
||||
if (form.id.data == "dashboard") or Project.query.get(form.id.data):
|
||||
raise ValidationError(Markup(_("The project identifier is used "
|
||||
"to log in and for the URL of the project. "
|
||||
"We tried to generate an identifier for you but a project "
|
||||
|
|
Loading…
Add table
Reference in a new issue