From 13797598033f7841e66f70fe934e0ff96a19bda6 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Wed, 11 Mar 2020 11:25:40 +0100 Subject: [PATCH] Changelogs are read-only protected --- apps/logs/api/serializers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/logs/api/serializers.py b/apps/logs/api/serializers.py index 7de7bc1a..108f2087 100644 --- a/apps/logs/api/serializers.py +++ b/apps/logs/api/serializers.py @@ -15,3 +15,5 @@ class ChangelogSerializer(serializers.ModelSerializer): class Meta: model = Changelog fields = '__all__' + # noinspection PyProtectedMember + read_only_fields = [f.name for f in model._meta.get_fields()] # Changelogs are read-only protected