Просмотр исходного кода

Fixes #3989: Correct HTTP content type assignment for webhooks

Jeremy Stretch 6 лет назад
Родитель
Сommit
7b517abdb6
2 измененных файлов с 2 добавлено и 1 удалено
  1. 1 0
      docs/release-notes/version-2.7.md
  2. 1 1
      netbox/extras/webhooks_worker.py

+ 1 - 0
docs/release-notes/version-2.7.md

@@ -8,6 +8,7 @@
 ## Bug Fixes
 
 * [#3983](https://github.com/netbox-community/netbox/issues/3983) - Permit the creation of multiple unnamed devices
+* [#3989](https://github.com/netbox-community/netbox/issues/3989) - Correct HTTP content type assignment for webhooks
 
 ---
 

+ 1 - 1
netbox/extras/webhooks_worker.py

@@ -23,7 +23,7 @@ def process_webhook(webhook, data, model_name, event, timestamp, username, reque
         'data': data
     }
     headers = {
-        'Content-Type': webhook.get_http_content_type_display(),
+        'Content-Type': webhook.http_content_type,
     }
     if webhook.additional_headers:
         headers.update(webhook.additional_headers)