def get_form(self, request, member, authorizing_access): return EditOrganizationMemberForm( authorizing_access=authorizing_access, data=request.POST or None, instance=member, initial={ 'type': member.type, 'has_global_access': member.has_global_access, 'teams': member.get_teams(), })
def get_form(self, request, member): return EditOrganizationMemberForm( data=request.POST or None, instance=member, initial={ 'role': member.role, 'teams': Team.objects.filter( id__in=OrganizationMemberTeam.objects.filter( organizationmember=member, ).values('team'), ), })