diff --git a/posts/serializers.py b/posts/serializers.py index cbe605a34f..6035684b02 100644 --- a/posts/serializers.py +++ b/posts/serializers.py @@ -251,7 +251,7 @@ def validate_public_figure(self, value: int): def validate_news_type(self, value: str): try: return Project.objects.get( - name__iexact=value, type=Project.ProjectTypes.NEWS_CATEGORY + slug__iexact=value, type=Project.ProjectTypes.NEWS_CATEGORY ) except Project.DoesNotExist: raise ValidationError("Slug does not exist")