def record_event(org, user, options):
    if isinstance(user, ApiUser):
        options.update({
            'api_key': user.name,
            'org_id': org.id
        })
    else:
        options.update({
            'user_id': user.id,
            'org_id': org.id
        })

    options.update({
        'user_agent': request.user_agent.string,
        'ip': request.remote_addr
    })

    if options not in 'timestamp':
        options['timestamp'] = int(time.time())

    record_event_task.delay(options)
dataset/ETHPy150Open getredash/redash/redash/handlers/base.py/record_event/swapped operands of `not in`