Skip to content

Commit

Permalink
chore(fix): add missing meta
Browse files Browse the repository at this point in the history
  • Loading branch information
ndu committed Dec 12, 2024
1 parent a0b756f commit 8992117
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions server/apps/research/serializers/article_serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ def _handle_error(self, error, operation_type, context_data):
raise serializers.ValidationError({
"non_field_errors": [f"Unable to {operation_type} article. Please try again later."]
}) from error

class Meta:
model = Article
fields = [
'id', 'title', 'slug', 'categories', 'authors', 'thumb',
'content', 'summary', 'acknowledgement', 'status',
'scheduled_publish_time', 'is_sponsored', 'sponsor_color',
'sponsor_text_color', 'views'
]

def create(self, validated_data):
try:
Expand Down

0 comments on commit 8992117

Please sign in to comment.