Skip to content

Commit

Permalink
chore: enable intake from project settings (#5977)
Browse files Browse the repository at this point in the history
  • Loading branch information
NarayanBavisetti authored Nov 9, 2024
1 parent 0cd36b8 commit 13083a7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions apiserver/plane/app/views/project/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,9 @@ def partial_update(self, request, slug, pk=None):
)

workspace = Workspace.objects.get(slug=slug)
intake_view = request.data.get(
"inbox_view", request.data.get("intake_view", False)
)

project = Project.objects.get(pk=pk)
current_instance = json.dumps(
Expand All @@ -442,14 +445,17 @@ def partial_update(self, request, slug, pk=None):

serializer = ProjectSerializer(
project,
data={**request.data},
data={
**request.data,
"intake_view": intake_view,
},
context={"workspace_id": workspace.id},
partial=True,
)

if serializer.is_valid():
serializer.save()
if serializer.data["intake_view"] or request.data.get("inbox_view", False):
if intake_view:
intake = Intake.objects.filter(
project=project,
is_default=True,
Expand Down

0 comments on commit 13083a7

Please sign in to comment.