From 0fc19a8b78b3a7bb33dfc3c2ca2afd812eb5057a Mon Sep 17 00:00:00 2001 From: Yash Jane Date: Fri, 29 Nov 2024 14:52:34 +0530 Subject: [PATCH] fix: use webhook data & headers from original Webhook doc --- .../doctype/raven_webhook/raven_webhook.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/raven/raven_integrations/doctype/raven_webhook/raven_webhook.py b/raven/raven_integrations/doctype/raven_webhook/raven_webhook.py index 1295ebcc2..a29f5408f 100644 --- a/raven/raven_integrations/doctype/raven_webhook/raven_webhook.py +++ b/raven/raven_integrations/doctype/raven_webhook/raven_webhook.py @@ -117,15 +117,12 @@ def update_webhook(self): webhook_doc.save() def set_webhook_data_and_headers(self, webhook_doc): - # Set the webhook data and headers - - # get the existing webhook data and headers - webhook_header = webhook_doc.get("webhook_headers", []) - webhook_data = webhook_doc.get("webhook_data", []) - + ''' + Set the webhook data and headers + ''' # get the existing webhook data and headers keys - webhook_data_keys = [data.key for data in self.webhook_data] - webhook_header_keys = [data.key for data in self.webhook_headers] + webhook_data_keys = [data.key for data in webhook_doc.webhook_data] + webhook_header_keys = [data.key for data in webhook_doc.webhook_headers] # remove the existing webhook data and headers # which are not in the current webhook data and headers