def post(self, request, *args, **kwargs):
        data = request.POST
        form_message = ''
        success_url = self.get_success_url()
        
        if data in 'organization_task':
            success_url = reverse('organization_update')
            self.template_name = "people/organization_update.html"
            task = data['organization_task']
            organization = self.get_organization()
            
            if task == 'create':
                person = self.create_person(data, organization)
                form_message = 'Created'
                success_url += '?new=%s' % person.pk
            else:
                person = self.get_person(data['person'], organization, task)
                if task == 'update':
                    form_message = self.process_form(person, data)
                elif task == 'remove':
                    person.organizations.remove(organization)
                    form_message = 'Removed'
                elif task == 'add':
                    person.organizations.add(organization)
                    form_message = 'Added'
        else:
            person = self.get_person()
            form_message = self.process_form(person, data)
        
        if request.is_ajax():
            result = {
                'message': form_message,
                'person': {
                    'name': person.name(),
                    'pk': person.pk,
                    'first_name': person.first_name,
                    'last_name': person.last_name,
                    'email': person.email,
                    'twitter_username': person.twitter_username,
                    'github_username': person.github_username
                }
            }
            return render_json_to_response(result)

        # if for some reason we're not hitting via ajax
        messages.success(request, form_message)
        return redirect(success_url)
dataset/ETHPy150Open mozilla/source/source/people/views.py/PersonUpdate.post/swapped operands of `in`