Exemple #1
0
def factory_membership_model(user_id, org_id, member_type='OWNER'):
    """Produce a Membership model."""
    membership = Membership(user_id=user_id,
                            org_id=org_id,
                            membership_type_code=member_type)

    membership.save()
    return membership
Exemple #2
0
def factory_membership_model(user_id, org_id, member_type='OWNER', member_status=1):
    """Produce a Membership model."""
    membership = MembershipModel(user_id=user_id,
                                 org_id=org_id,
                                 membership_type_code=member_type,
                                 membership_type_status=member_status)

    membership.save()
    return membership