Commit 1126f348 authored by Sofia Papagiannaki's avatar Sofia Papagiannaki
Browse files

Minor fixes

parent 98590b5a
......@@ -932,7 +932,7 @@ class ProjectApplicationForm(forms.ModelForm):
self.initial['comments'] = instance.projectapplication.comments
def clean(self):
userid = self.data.get('user', None)[0]
userid = self.data.get('user', None)
self.user = None
if userid:
try:
......
......@@ -1156,7 +1156,7 @@ class ProjectDefinition(models.Model):
)
if q:
raise ValidationError(
{'name': [_(astakos_messages.UNIQUE_PROJECT_NAME_CONSTRAIN_ERR)]}
_(astakos_messages.UNIQUE_PROJECT_NAME_CONSTRAIN_ERR)
)
......@@ -1253,8 +1253,12 @@ class ProjectApplication(models.Model):
ValidationError: if there is other alive project with the same name
"""
try:
self.definition.validate_name()
except ValidationError, e:
raise PermissionDenied(e.messages[0])
if self.state != PENDING:
return
raise PermissionDenied(_(PROJECT_ALREADY_ACTIVE))
create = False
try:
self.precursor_application.project
......@@ -1288,7 +1292,7 @@ class ProjectApplication(models.Model):
settings.SERVER_EMAIL,
[self.owner.email],
_('Project application has been approved on %s alpha2 testing' % SITENAME),
_('Your application request %(id)s has been apporved.')
_('Your application request %(id)s has been approved.') % self.id
)
notification.send()
......
......@@ -180,7 +180,7 @@
<td>Owner</td>
{% else %}
{% if m.acceptance_date %}
<td>Approved
<td>Approved {% if m.leave_request_date%}(User has requested to leave the project on:{{m.leave_request_date}}){% endif %}
{% if user == object.owner and user != m.person %}
<a href="{% url project_remove_member object.id m.person.id %}?{% if page %}page={{ page }}{% endif %}{% if sorting %}&sorting={{sorting}}{% endif %}">Remove</a>
{% endif %}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment