1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Adds custom field on webhook model (#13336)

* adds custom field on webhook model #11936

* adds tags on webhook model #11936

* Remove extraneous import; revert change to NetBoxModelForm (no longer needed)

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
Abhimanyu Saharan
2023-08-01 23:35:47 +05:30
committed by GitHub
parent 7b998cfeb4
commit 1cc78be6ca
11 changed files with 51 additions and 15 deletions

View File

@@ -61,7 +61,7 @@ __all__ = (
# Webhooks
#
class WebhookSerializer(ValidatedModelSerializer):
class WebhookSerializer(NetBoxModelSerializer):
url = serializers.HyperlinkedIdentityField(view_name='extras-api:webhook-detail')
content_types = ContentTypeField(
queryset=ContentType.objects.filter(FeatureQuery('webhooks').get_query()),
@@ -74,7 +74,7 @@ class WebhookSerializer(ValidatedModelSerializer):
'id', 'url', 'display', 'content_types', 'name', 'type_create', 'type_update', 'type_delete',
'type_job_start', 'type_job_end', 'payload_url', 'enabled', 'http_method', 'http_content_type',
'additional_headers', 'body_template', 'secret', 'conditions', 'ssl_verification', 'ca_file_path',
'created', 'last_updated',
'custom_fields', 'tags', 'created', 'last_updated',
]