fix: adding new validation to change page is available before proceeding with update (#5176)

This commit is contained in:
sriram veeraghanta
2024-07-19 17:44:45 +05:30
committed by GitHub
parent a6d111f66d
commit 8f9b568a65

View File

@@ -492,6 +492,12 @@ class PagesDescriptionViewSet(BaseViewSet):
.first()
)
if page is None:
return Response(
{"error": "Page not found"},
status=404,
)
if page.is_locked:
return Response(
{"error": "Page is locked"},