Add kind field to JournalEntry

This commit is contained in:
Jeremy Stretch
2021-03-17 12:51:39 -04:00
parent bd95d2b852
commit 82fbd975f1
8 changed files with 60 additions and 5 deletions

View File

@@ -192,12 +192,16 @@ class JournalEntrySerializer(ValidatedModelSerializer):
queryset=ContentType.objects.all()
)
assigned_object = serializers.SerializerMethodField(read_only=True)
kind = ChoiceField(
choices=JournalEntryKindChoices,
required=False
)
class Meta:
model = JournalEntry
fields = [
'id', 'url', 'display', 'assigned_object_type', 'assigned_object_id', 'assigned_object', 'created',
'created_by', 'comments',
'created_by', 'kind', 'comments',
]
def validate(self, data):