Commit 3a1c2a0d authored by Sofia Papagiannaki's avatar Sofia Papagiannaki
Browse files

Fix add_member in case of auto_accept join policy

parent f881e3dd
......@@ -1402,6 +1402,8 @@ class Project(models.Model):
m, created = ProjectMembership.objects.get_or_create(
person=user, project=self
)
if m.acceptance_date:
return
m.accept(delete_on_failure=created, request_user=None)
def reject_member(self, user, request_user=None):
......@@ -1496,7 +1498,7 @@ class ProjectMembership(models.Model):
raise PermissionDenied(_(astakos_messages.MEMBER_NUMBER_LIMIT_REACHED))
except PermissionDenied, e:
if delete_on_failure:
m.delete()
self.delete()
raise
if self.acceptance_date:
return
......
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