mirror of
https://github.com/makeplane/plane.git
synced 2026-09-03 12:50:29 +02:00
@@ -375,7 +375,7 @@ class PageViewSet(BaseViewSet):
|
||||
entity_type="page",
|
||||
).delete()
|
||||
# Delete the deploy board
|
||||
DeployBoard.objects.get(
|
||||
DeployBoard.objects.filter(
|
||||
entity_name="page",
|
||||
entity_identifier=pk,
|
||||
workspace__slug=slug,
|
||||
|
||||
@@ -459,11 +459,19 @@ class ProjectViewSet(BaseViewSet):
|
||||
def destroy(self, request, slug, pk):
|
||||
project = Project.objects.get(pk=pk)
|
||||
project.delete()
|
||||
DeployBoard.objects.get(
|
||||
entity_name="project",
|
||||
entity_identifier=pk,
|
||||
|
||||
# Delete the project members
|
||||
DeployBoard.objects.filter(
|
||||
project_id=pk,
|
||||
workspace__slug=slug,
|
||||
).delete()
|
||||
|
||||
# Delete the user favorite
|
||||
UserFavorite.objects.filter(
|
||||
project_id=pk,
|
||||
workspace__slug=slug,
|
||||
).delete()
|
||||
|
||||
return Response(status=status.HTTP_204_NO_CONTENT)
|
||||
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ class ProjectPagePublishEndpoint(BaseAPIView):
|
||||
deploy_board, _ = DeployBoard.objects.get_or_create(
|
||||
entity_identifier=page_id,
|
||||
entity_name="page",
|
||||
project_id=project_id,
|
||||
defaults={
|
||||
"is_comments_enabled": comments,
|
||||
"is_reactions_enabled": reactions,
|
||||
|
||||
@@ -219,9 +219,7 @@ class WorkspacePageViewSet(BaseViewSet):
|
||||
@check_feature_flag(FeatureFlag.WORKSPACE_PAGES)
|
||||
def access(self, request, slug, pk):
|
||||
access = request.data.get("access", 0)
|
||||
page = Page.objects.filter(
|
||||
pk=pk, workspace__slug=slug
|
||||
).first()
|
||||
page = Page.objects.filter(pk=pk, workspace__slug=slug).first()
|
||||
|
||||
# Only update access if the page owner is the requesting user
|
||||
if (
|
||||
@@ -337,7 +335,7 @@ class WorkspacePageViewSet(BaseViewSet):
|
||||
|
||||
page.delete()
|
||||
# Delete the deploy board
|
||||
DeployBoard.objects.get(
|
||||
DeployBoard.objects.filter(
|
||||
entity_name="page",
|
||||
entity_identifier=pk,
|
||||
workspace__slug=slug,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# base requirements
|
||||
|
||||
# django
|
||||
Django==4.2.14
|
||||
Django==4.2.15
|
||||
# rest framework
|
||||
djangorestframework==3.15.2
|
||||
# postgres
|
||||
|
||||
@@ -1 +1 @@
|
||||
python-3.12.4
|
||||
python-3.12.5
|
||||
Reference in New Issue
Block a user