git://git.onelab.eu
/
myslice.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Scheduler: adding/removing resources enforce warnings and recount number of unconfigu...
[myslice.git]
/
portal
/
projectrequestview.py
diff --git
a/portal/projectrequestview.py
b/portal/projectrequestview.py
index
451469d
..
819cce5
100644
(file)
--- a/
portal/projectrequestview.py
+++ b/
portal/projectrequestview.py
@@
-106,9
+106,13
@@
class ProjectRequestView(LoginRequiredAutoLogoutView, ThemeView):
'project_name' : wsgi_request.POST.get('project_name', ''),
'purpose' : wsgi_request.POST.get('purpose', ''),
}
'project_name' : wsgi_request.POST.get('project_name', ''),
'purpose' : wsgi_request.POST.get('purpose', ''),
}
+
+ # for new projects max project_name length is 10
+ if (len(post['project_name']) >10):
+ errors.append('Project name can be maximum 10 characters long')
- if (post['authority_hrn'] is None or post['authority_hrn'] == ''):
- errors.append('Organization is mandatory')
+
#
if (post['authority_hrn'] is None or post['authority_hrn'] == ''):
+
#
errors.append('Organization is mandatory')
if (post['purpose'] is None or post['purpose'] == ''):
errors.append('Project purpose is mandatory')
if (post['purpose'] is None or post['purpose'] == ''):
errors.append('Project purpose is mandatory')
@@
-118,12
+122,7
@@
class ProjectRequestView(LoginRequiredAutoLogoutView, ThemeView):
# What kind of project name is valid?
if (post['project_name'] is None or post['project_name'] == ''):
# What kind of project name is valid?
if (post['project_name'] is None or post['project_name'] == ''):
- errors.append('Project name is mandatory')
-
- # max project_name length is 10
- if (len(post['project_name']) >10):
- errors.append('Project name can be maximum 10 characters long')
-
+ errors.append('Project name is mandatory')
if not errors:
print "is_pi on auth_hrn = ", user_authority
if not errors:
print "is_pi on auth_hrn = ", user_authority