diff options
| author | Alexandre Avenel <avenel.alexandre@gmail.com> | 2015-04-12 20:41:57 +0200 |
|---|---|---|
| committer | Alexandre Avenel <avenel.alexandre@gmail.com> | 2015-04-12 20:41:57 +0200 |
| commit | 4f4439eec9c13a0424b3dc33304feda8756c0116 (patch) | |
| tree | ce4ed8bbd35bffe1ba53873bda888c333d1de966 /budget | |
| parent | 7b338a2a1473a1b47689386e70d39ea75384716a (diff) | |
| download | ihatemoney-mirror-4f4439eec9c13a0424b3dc33304feda8756c0116.zip ihatemoney-mirror-4f4439eec9c13a0424b3dc33304feda8756c0116.tar.gz ihatemoney-mirror-4f4439eec9c13a0424b3dc33304feda8756c0116.tar.bz2 | |
Fix #118 : Create a new project with the name "dashboard" should raise an exception
Diffstat (limited to 'budget')
| -rw-r--r-- | budget/forms.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/budget/forms.py b/budget/forms.py index 9b11085..2dde57d 100644 --- a/budget/forms.py +++ b/budget/forms.py @@ -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 " |
