From 46cef00ac0734c9dcb78696ef48daca54ebb2e91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Desno=C3=AB?= Date: Thu, 14 Sep 2023 13:14:23 +0000 Subject: [PATCH 1/2] Fix creation of extras/config-templates objects using the REST API --- netbox/extras/api/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/extras/api/serializers.py b/netbox/extras/api/serializers.py index e007db43dae..9637dc14d05 100644 --- a/netbox/extras/api/serializers.py +++ b/netbox/extras/api/serializers.py @@ -454,7 +454,7 @@ class ConfigTemplateSerializer(TaggableModelSerializer, ValidatedModelSerializer required=False ) data_file = NestedDataFileSerializer( - read_only=True + read_only=False ) class Meta: From daef8546f67aa617ff269957d2b937e9cd56b472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Desno=C3=AB?= Date: Fri, 22 Sep 2023 18:53:30 +0200 Subject: [PATCH 2/2] Update serializers.py --- netbox/extras/api/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/extras/api/serializers.py b/netbox/extras/api/serializers.py index 9637dc14d05..c1fad99eead 100644 --- a/netbox/extras/api/serializers.py +++ b/netbox/extras/api/serializers.py @@ -454,7 +454,7 @@ class ConfigTemplateSerializer(TaggableModelSerializer, ValidatedModelSerializer required=False ) data_file = NestedDataFileSerializer( - read_only=False + required=False ) class Meta: