Revision e05c541e

b/snf-astakos-app/astakos/im/functions.py
590 590
def enroll_member(project_id, user, request_user=None):
591 591
    project = get_project_for_update(project_id)
592 592
    accept_membership_checks(project, request_user)
593
    membership = create_membership(project, user)
593

  
594
    membership, created = ProjectMembership.objects.get_or_create(
595
        project=project,
596
        person=user)
594 597

  
595 598
    if not membership.can_accept():
596 599
        m = _(astakos_messages.NOT_MEMBERSHIP_REQUEST)
597 600
        raise PermissionDenied(m)
598 601

  
599 602
    membership.accept()
600
    qh_sync_user(user)
603
    qh_sync_user(user.id)
601 604
    logger.info("User %s has been enrolled in %s." %
602 605
                (membership.person.log_display, project))
603 606

  

Also available in: Unified diff