-
Notifications
You must be signed in to change notification settings - Fork 3.6k
fix: intake toggle #6111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: intake toggle #6111
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -384,11 +384,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) | ||||||
| intake_view = request.data.get("inbox_view", project.intake_view) | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix inconsistent parameter naming between request and model The code uses "inbox_view" in the request data but "intake_view" in the model and subsequent operations. This inconsistency could lead to confusion and potential bugs. Apply this change to maintain consistent naming: -intake_view = request.data.get("inbox_view", project.intake_view)
+intake_view = request.data.get("intake_view", project.intake_view)📝 Committable suggestion
Suggested change
|
||||||
| current_instance = json.dumps( | ||||||
| ProjectSerializer(project).data, cls=DjangoJSONEncoder | ||||||
| ) | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix parameter name mismatch: "inbox_view" vs "intake_view"
The code retrieves "inbox_view" from request data but the model uses "intake_view". This inconsistency could cause the toggle to fail silently.
📝 Committable suggestion