@webhooks.handler_all
def customer_event_attach(event, event_data, event_type, event_subtype):
    stripe_customer_crud_events = ["created", "updated", "deleted"]
    skip_events = ["plan", "transfer"]

    if skip_events in event_type:
        return
    elif event_type == "customer" and event_subtype in stripe_customer_crud_events:
        stripe_customer_id = event_data["object"]["id"]
    else:
        stripe_customer_id = event_data["object"].get("customer", None)

    if stripe_customer_id:
        try:
            event.customer = Customer.objects.get(stripe_id=stripe_customer_id)
        except Customer.DoesNotExist:
            pass
dataset/ETHPy150Open pydanny/dj-stripe/djstripe/event_handlers.py/customer_event_attach/swapped operands of `in`