审核
All checks were successful
Deploy to Server / deploy (push) Successful in 39s

This commit is contained in:
jeremygan2021
2026-02-27 14:44:04 +08:00
parent a58fc40e10
commit 93ad681689
7 changed files with 68 additions and 11 deletions

View File

@@ -120,14 +120,14 @@ class TopicSerializer(serializers.ModelSerializer):
class Meta:
model = Topic
fields = [
'id', 'title', 'category', 'content', 'author', 'author_info',
'id', 'title', 'category', 'status', 'content', 'author', 'author_info',
'related_product', 'product_info',
'related_service', 'service_info',
'related_course', 'course_info',
'view_count', 'is_pinned', 'created_at', 'updated_at',
'is_verified_owner', 'replies', 'media', 'media_ids'
]
read_only_fields = ['author', 'view_count', 'created_at', 'updated_at', 'is_verified_owner']
read_only_fields = ['author', 'view_count', 'created_at', 'updated_at', 'is_verified_owner', 'status']
def create(self, validated_data):
media_ids = validated_data.pop('media_ids', [])