feat(extras): Allow updates to data_source and data_file via API

Adds support for PATCHing ConfigContext and ConfigContextProfile with
integer IDs for `data_source` and `data_file`.
Adds regression tests to validate assignment and API functionality.

Fixes #20933
This commit is contained in:
Martin Hauser
2026-01-14 17:58:26 +01:00
committed by Jeremy Stretch
parent 0ddc5805c4
commit 1c46215cd5
3 changed files with 95 additions and 3 deletions

View File

@@ -44,3 +44,4 @@ class DataFileSerializer(NetBoxModelSerializer):
'id', 'url', 'display_url', 'display', 'source', 'path', 'last_updated', 'size', 'hash',
]
brief_fields = ('id', 'url', 'display', 'path')
read_only_fields = ['path', 'last_updated', 'size', 'hash']