Skip to content

Commit

Permalink
Fix: page detail by path
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun committed May 28, 2024
1 parent 4103d4d commit 1d03d7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions djangocms_rest/serializers/pageserializer.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
from cms.models import PageContent
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.urls import reverse
from rest_framework import serializers
from rest_framework.request import Request

Expand Down
4 changes: 2 additions & 2 deletions djangocms_rest/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ def get(self, request, language, path="", format=None):
if not user_can_view_page(request.user, page):
raise Http404

serializer = PageSerializer(
RESTPage(request, page.get_content_obj(language, fallback=True)), read_only=True
serializer = PageContentSerializer(
request, page.get_content_obj(language, fallback=True), read_only=True
)
return Response(serializer.data)

Expand Down

0 comments on commit 1d03d7c

Please sign in to comment.