chore: enable intake from project settings (#5977)
This commit is contained in:
parent
0cd36b854e
commit
13083a77eb
1 changed files with 8 additions and 2 deletions
|
|
@ -429,6 +429,9 @@ class ProjectViewSet(BaseViewSet):
|
|||
)
|
||||
|
||||
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(
|
||||
|
|
@ -442,14 +445,17 @@ class ProjectViewSet(BaseViewSet):
|
|||
|
||||
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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue