Commit b9bb0640 authored by Giorgos Korfiatis's avatar Giorgos Korfiatis
Browse files

astakos: Enroll in project even if request is pending

parent 3e24eee3
......@@ -590,14 +590,17 @@ def remove_membership(project_id, user, request_user=None):
def enroll_member(project_id, user, request_user=None):
project = get_project_for_update(project_id)
accept_membership_checks(project, request_user)
membership = create_membership(project, user)
membership, created = ProjectMembership.objects.get_or_create(
if not membership.can_accept():
m = _(astakos_messages.NOT_MEMBERSHIP_REQUEST)
raise PermissionDenied(m)
qh_sync_user("User %s has been enrolled in %s." %
(membership.person.log_display, project))
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