'Get or create an inbound webhook to track webhook requests
We shouldn\'t need this, but to support legacy webhooks, we can\'t assume
that a webhook has ever been created on our side. Most providers don\'t
pass the webhook ID in either, so we default to just finding *any*
integration from the provider. This is not ideal, but the
:py:class:`WebhookView` view solves this by performing a lookup on the
integration instead of guessing.'

def get_integration(self):

    if (self.integration is not None):
        return self.integration
    (integration, _) = Integration.objects.get_or_create(project=self.project, integration_type=self.integration_type)
    return integration
