Changelogs are read-only protected

This commit is contained in:
Yohann D'ANELLO 2020-03-11 11:25:40 +01:00
parent 417cd5da04
commit 1379759803
1 changed files with 2 additions and 0 deletions

View File

@ -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