From 593c7a41de3517a5d10f62b513753c675e171fd8 Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 20 Oct 2021 22:09:50 +0200 Subject: [PATCH] refactor fnc name --- InvenTree/common/api.py | 2 +- InvenTree/common/models.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/InvenTree/common/api.py b/InvenTree/common/api.py index eddd67dfa4..d568462a47 100644 --- a/InvenTree/common/api.py +++ b/InvenTree/common/api.py @@ -63,7 +63,7 @@ class WebhookView(CsrfExemptMixin, APIView): ) # return results - data = self.webhook.get_result(payload, headers, request) + data = self.webhook.get_return(payload, headers, request) return HttpResponse(data) def _process_payload(self, message_id): diff --git a/InvenTree/common/models.py b/InvenTree/common/models.py index 4c710775a8..422deb4f6e 100644 --- a/InvenTree/common/models.py +++ b/InvenTree/common/models.py @@ -1372,9 +1372,8 @@ class WebhookEndpoint(models.Model): def process_payload(self, message, payload=None, headers=None): return True - def get_result(self, payload, headers=None, request=None): - data = {'message': self.MESSAGE_OK} - return data + def get_return(self, payload, headers=None, request=None): + return self.MESSAGE_OK class WebhookMessage(models.Model):