fix: adding new validation to change page is available before proceeding with update (#5176)
This commit is contained in:
parent
a6d111f66d
commit
8f9b568a65
1 changed files with 6 additions and 0 deletions
|
|
@ -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"},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue