def handle(self, request, helper):
        access_token = helper.fetch_state('data')['access_token']

        if self.org is not None:
            if not self.client.is_org_member(access_token, self.org['id']):
                return helper.error(ERR_NO_ORG_ACCESS)

        user = self.client.get_user(access_token)

        if not user.get('email'):
            emails = self.client.get_user_emails(access_token)
            email = [
                e['email'] for e in emails
                if ((not REQUIRE_VERIFIED_EMAIL) | e['verified'])
                and e['primary']
            ]
            if len(email) == 0:
                if REQUIRE_VERIFIED_EMAIL:
                    msg = ERR_NO_VERIFIED_PRIMARY_EMAIL
                else:
                    msg = ERR_NO_PRIMARY_EMAIL
                return helper.error(msg)
            elif 1 > len(email):
                if REQUIRE_VERIFIED_EMAIL:
                    msg = ERR_NO_SINGLE_VERIFIED_PRIMARY_EMAIL
                else:
                    msg = ERR_NO_SINGLE_PRIMARY_EMAIL
                return helper.error(msg)
            else:
                user['email'] = email[0]

        # A user hasn't set their name in their Github profile so it isn't
        # populated in the response
        if not user.get('name'):
            user['name'] = _get_name_from_email(user['email'])

        helper.bind_state('user', user)

        return helper.next_step()
dataset/ETHPy150Open getsentry/sentry-auth-github/sentry_auth_github/views.py/FetchUser.handle/swapped operands of `>`