Skip to content
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

[WEB-3038]feat: home preferences #6308

Merged
merged 29 commits into from
Jan 6, 2025
Merged

Conversation

sangeethailango
Copy link
Collaborator

@sangeethailango sangeethailango commented Jan 3, 2025

Description

This PR will provide endpoints to create/patch widgets.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

Summary by CodeRabbit

  • New Features

    • Added workspace home preferences functionality.
    • Introduced a new endpoint for managing workspace home preferences.
    • Implemented ability to retrieve and update user-specific workspace preferences.
  • Improvements

    • Enhanced workspace serializers with new preference-related classes.
    • Updated URL routing to support new preference management endpoints.
    • Improved readability of serializer fields and code structure.

Copy link
Contributor

coderabbitai bot commented Jan 3, 2025

Walkthrough

This pull request introduces a feature for managing workspace home preferences in the Plane application. It includes the addition of a new WorkspaceHomePreference model, along with a serializer, view set, and URL routing. Users can now retrieve and update their workspace home interface preferences, allowing for customization of enabled features and their order.

Changes

File Change Summary
apiserver/plane/app/serializers/workspace.py - Added WorkspaceHomePreferenceSerializer
- Reformatted import statements and class definitions
apiserver/plane/app/urls/workspace.py - Added new URL pattern for workspace home preferences
- Updated quick links endpoint
apiserver/plane/app/views/__init__.py - Imported WorkspacePreferenceViewSet
apiserver/plane/app/views/workspace/preference.py - Added WorkspacePreferenceViewSet with GET and PATCH methods
apiserver/plane/db/models/__init__.py - Imported WorkspaceHomePreference model
apiserver/plane/app/serializers/__init__.py - Imported WorkspaceHomePreferenceSerializer

Possibly related PRs

  • feat: workspace home preference model #6300: This PR introduces the WorkspaceHomePreference model, which is directly related to the new WorkspaceHomePreferenceSerializer class added in the main PR, as both are focused on managing workspace home preferences.

Suggested labels

⚙️backend, 🔄migrations

Suggested reviewers

  • sriramveeraghanta
  • pablohashescobar

Poem

🐰 A rabbit's tale of workspace delight,
Preferences dancing, setting things right!
Home screens now flexible, sorted with care,
Customization blooming everywhere!
Code hops along, preferences take flight! 🚀


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e766e3d and 607f2df.

📒 Files selected for processing (2)
  • apiserver/plane/app/serializers/workspace.py (5 hunks)
  • apiserver/plane/app/views/workspace/preference.py (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • apiserver/plane/app/views/workspace/preference.py
  • apiserver/plane/app/serializers/workspace.py
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: lint-apiserver
  • GitHub Check: Analyze (javascript)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@sangeethailango sangeethailango marked this pull request as draft January 3, 2025 11:42
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (5)
apiserver/plane/app/views/workspace/preference.py (3)

3-5: Remove duplicate import to avoid confusion.

Line 5 re-imports WorkspaceHomePreference, already imported on line 3. Removing the redundant import avoids redefinition warnings from linters and clarifies code usage.

-from plane.db.models.workspace import WorkspaceHomePreference
🧰 Tools
🪛 Ruff (0.8.2)

5-5: Redefinition of unused WorkspaceHomePreference from line 3

Remove definition: WorkspaceHomePreference

(F811)


20-24: Optimize multiple database calls.

Performing multiple .exists() calls can be consolidated with a single query (e.g., filtering by key__in=[...]) to reduce repetitive lookups and improve performance.

🧰 Tools
🪛 Ruff (0.8.2)

20-20: Line too long (171 > 88)

(E501)


21-21: Line too long (163 > 88)

(E501)


22-22: Line too long (171 > 88)

(E501)


23-23: Line too long (173 > 88)

(E501)


24-24: Line too long (177 > 88)

(E501)


20-40: Address line length issues from static analysis.

Refactor or wrap code across multiple lines to comply with the recommended limits. This also improves readability.

🧰 Tools
🪛 Ruff (0.8.2)

20-20: Line too long (171 > 88)

(E501)


21-21: Line too long (163 > 88)

(E501)


22-22: Line too long (171 > 88)

(E501)


23-23: Line too long (173 > 88)

(E501)


24-24: Line too long (177 > 88)

(E501)


27-27: Line too long (210 > 88)

(E501)


38-38: Line too long (136 > 88)

(E501)

apiserver/plane/db/models/page.py (1)

23-23: Switching to TextField.

Removing a max_length constraint provides flexibility but check if large text inputs for name align with UI and search requirements.

apiserver/plane/db/models/workspace.py (1)

347-385: Model addition looks good, but consider default widget ordering.

The WorkspaceHomePreference model and its associated fields appear consistent with the rest of the code. However, the default sort_order of 65535 might limit future expansions (e.g., a negative or ascending range). If needed, consider a more flexible approach or confirm that 65535 ordering is sufficient.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2622dd6 and 6681d29.

📒 Files selected for processing (9)
  • apiserver/plane/app/serializers/workspace.py (1 hunks)
  • apiserver/plane/app/urls/workspace.py (2 hunks)
  • apiserver/plane/app/views/__init__.py (1 hunks)
  • apiserver/plane/app/views/workspace/preference.py (1 hunks)
  • apiserver/plane/db/migrations/0089_workspacehomepreference_and_more.py (1 hunks)
  • apiserver/plane/db/migrations/0090_workspacehomepreference_sort_order.py (1 hunks)
  • apiserver/plane/db/models/__init__.py (1 hunks)
  • apiserver/plane/db/models/page.py (1 hunks)
  • apiserver/plane/db/models/workspace.py (1 hunks)
🧰 Additional context used
🪛 Ruff (0.8.2)
apiserver/plane/app/views/workspace/preference.py

5-5: Redefinition of unused WorkspaceHomePreference from line 3

Remove definition: WorkspaceHomePreference

(F811)


20-20: Line too long (171 > 88)

(E501)


21-21: Line too long (163 > 88)

(E501)


22-22: Line too long (171 > 88)

(E501)


23-23: Line too long (173 > 88)

(E501)


24-24: Line too long (177 > 88)

(E501)


27-27: Line too long (210 > 88)

(E501)


38-38: Line too long (136 > 88)

(E501)

apiserver/plane/app/serializers/workspace.py

15-15: plane.db.models.WorkspaceHomePreference imported but unused

Remove unused import: plane.db.models.WorkspaceHomePreference

(F401)

apiserver/plane/db/migrations/0090_workspacehomepreference_sort_order.py

3-3: django.db.models imported but unused

Remove unused import: django.db.models

(F401)

🔇 Additional comments (11)
apiserver/plane/db/migrations/0090_workspacehomepreference_sort_order.py (1)

1-2: Verify migration timestamp

The migration is dated January 2, 2025. Since this is a future date, please ensure this won't cause issues with other migrations in the deployment pipeline.

✅ Verification successful

Migration timestamp is consistent with the repository's timeline

Looking at the migration history, this migration (0090) follows a clear chronological sequence with the previous migrations. The most recent migrations show:

  • 0088: December 24, 2024
  • 0089: January 2, 2025 07:47
  • 0090: January 2, 2025 08:25 (current migration)

The timestamp is consistent with the repository's timeline and follows the correct sequential order. The migration timestamps are properly incremental, and there are no conflicting timestamps that would cause deployment issues.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for any migrations with conflicting or future dates
find . -type f -name "*.py" -path "*/migrations/*" -exec grep -l "Generated by Django" {} \; | while read -r file; do
    echo "=== $file ==="
    grep "Generated by Django" "$file"
done

Length of output: 31639

apiserver/plane/db/migrations/0089_workspacehomepreference_and_more.py (4)

16-92: Good introduction of a separate model and constraints.

The creation of WorkspaceHomePreference with explicit constraints (both unique and unique-together) ensures data integrity, especially with deleted_at__isnull in place for soft deletion. This approach is consistent with Django best practices.


93-103: Verify uniqueness constraints.

When using both UniqueConstraint (with deleted_at__isnull) and unique_together={"workspace", "user", "key", "deleted_at"}, ensure you have tested scenarios where records are soft-deleted but need re-creation for the same (workspace, user, key). This could unintentionally trigger constraint violations if those records are not fully purged.


105-109: Confirm “text” field alignment with existing usage.

Converting the Page model's name field to a text-based field may affect the structure of related queries or indexes. If frequent indexing or text-based lookups are used, confirm that performance is acceptable.


110-114: Sort order default usage.

The default of 65535 is a common pattern for “lowest priority” or “end-of-list” positioning. Confirm whether this satisfies your sorting requirements long-term.

apiserver/plane/db/models/__init__.py (1)

72-72: Successful addition of the WorkspaceHomePreference import.

This maintains consistency with new migrations. No issues detected.

apiserver/plane/app/views/workspace/preference.py (1)

16-18: Handle possible DoesNotExist exception.

Workspace.objects.get(slug=slug, owner=request.user) can raise Workspace.DoesNotExist. Consider graceful error handling (e.g., 404 response).

apiserver/plane/app/views/__init__.py (1)

44-44: WorkspacePreferenceViewSet import looks correct.

No concerns. Integrates well with the new feature set.

apiserver/plane/app/urls/workspace.py (2)

229-233: Path naming is consistent and clear.

The new route for workspace home preferences aligns well with the existing naming convention (e.g., quick-links). This should help maintain clarity and consistency across the workspace endpoints.


30-31: Confirm the necessity of both imports.

It appears both the QuickLinkViewSet and WorkspacePreferenceViewSet are being imported. Verify that they're both used and that no extraneous imports remain.

✅ Verification successful

Both imports are necessary and actively used in the workspace URLs

The verification confirms that both imports are required:

  • QuickLinkViewSet is used for list/create operations and retrieve/update/delete operations in the workspace URLs
  • WorkspacePreferenceViewSet is used for workspace preference operations

Both ViewSets are properly defined in their respective modules and are actively referenced in the URL patterns, making these imports necessary.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check usage of WorkspacePreferenceViewSet and QuickLinkViewSet to confirm they are referenced.

rg "QuickLinkViewSet"
rg "WorkspacePreferenceViewSet"

Length of output: 888

apiserver/plane/db/models/workspace.py (1)

344-345: No issues with the updated __str__ method.

Confirm that the updated return format meets the logging or debugging requirements. It currently returns <workspace_id> <url>.

apiserver/plane/app/views/workspace/preference.py Outdated Show resolved Hide resolved
apiserver/plane/app/views/workspace/preference.py Outdated Show resolved Hide resolved
apiserver/plane/app/serializers/workspace.py Outdated Show resolved Hide resolved
@sangeethailango sangeethailango self-assigned this Jan 3, 2025
@sangeethailango sangeethailango marked this pull request as ready for review January 3, 2025 13:53
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (2)
apiserver/plane/app/views/workspace/preference.py (2)

31-43: Improve bulk creation robustness.

The sort order calculation (index + 1) * 1000 could potentially overflow for large indices. Consider using a smaller multiplier or implementing a more robust ordering strategy.

-                    sort_order=(index + 1) * 1000,
+                    sort_order=(index + 1) * 100,  # Smaller multiplier

Also, consider adding a maximum limit to prevent potential abuse:

+        if len(create_preference_keys) > 50:  # Arbitrary limit
+            return Response(
+                {"error": "Too many preferences to create"},
+                status=status.HTTP_400_BAD_REQUEST
+            )

13-49: Add docstring for better documentation.

Consider adding a docstring to document the view's purpose, parameters, and response format.

 class WorkspacePreferenceViewSet(BaseAPIView):
+    """
+    API endpoint for managing workspace home preferences.
+    
+    Retrieves existing preferences for the authenticated user in the specified workspace.
+    Creates default preferences if they don't exist.
+    
+    Returns:
+        Response: List of preferences with their keys, enabled status, sort order, and config.
+    """
     model = WorkspaceHomePreference
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6681d29 and f511168.

📒 Files selected for processing (4)
  • apiserver/plane/app/serializers/workspace.py (4 hunks)
  • apiserver/plane/app/urls/workspace.py (2 hunks)
  • apiserver/plane/app/views/__init__.py (1 hunks)
  • apiserver/plane/app/views/workspace/preference.py (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • apiserver/plane/app/serializers/workspace.py
  • apiserver/plane/app/views/init.py
🧰 Additional context used
🪛 Ruff (0.8.2)
apiserver/plane/app/views/workspace/preference.py

5-5: Redefinition of unused WorkspaceHomePreference from line 3

Remove definition: WorkspaceHomePreference

(F811)

🔇 Additional comments (2)
apiserver/plane/app/urls/workspace.py (2)

223-235: LGTM! URL patterns are well-structured.

The new endpoints for quick links and home preferences follow the established URL pattern structure and naming conventions.


Line range hint 31-241: Verify URL pattern consistency across the codebase.

Let's ensure the new endpoints maintain consistency with existing patterns.

✅ Verification successful

Let me gather more information to verify the URL patterns comprehensively.


Let me check one more specific pattern to complete the verification.


Based on the verification results, I can now provide the final response:

URL patterns are consistent with established conventions

The verification shows that:

  • The workspace URLs consistently use <str:slug> for workspace identification, with only one exception in the license module which is a different context (InstanceWorkSpaceEndpoint).
  • Resource identifiers consistently use <uuid:pk> for specific resource identification.
  • The URL structure in the provided code follows the same pattern as other endpoints in the codebase.
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check URL pattern consistency for workspace endpoints

# Check if all workspace URLs use slug parameter
echo "Checking workspace URL patterns..."
rg "path\(.*workspaces/.*" | grep -v "<str:slug>"

# Check if all specific resource identifiers use UUID
echo "Checking UUID usage in URLs..."
rg "path\(.*/<\w+:pk>/" | grep -v "<uuid:pk>"

Length of output: 370


Script:

#!/bin/bash
# Check all URL patterns in the workspace-related files
echo "=== Checking all workspace URL patterns ==="
fd "urls.py" | xargs rg "path\(" -A 1

# Check specific identifiers in URL patterns
echo "=== Checking identifier patterns ==="
fd "urls.py" | xargs rg "<\w+:\w+>"

# Check workspace viewsets to ensure consistent parameter naming
echo "=== Checking workspace viewset parameter naming ==="
ast-grep --pattern 'class $_WorkSpace$_ViewSet'

Length of output: 7231


Script:

#!/bin/bash
# Check workspace-related views and their parameter naming
echo "=== Checking workspace view implementations ==="
ast-grep --pattern 'class $_(Workspace|WorkSpace)$_'

# Check URL patterns specifically in app/urls
echo "=== Checking app URL patterns ==="
fd "urls" -t f --full-path "app/urls" | xargs cat

Length of output: 380

apiserver/plane/app/views/workspace/preference.py Outdated Show resolved Hide resolved
apiserver/plane/app/views/workspace/preference.py Outdated Show resolved Hide resolved
sangeethailango and others added 17 commits January 3, 2025 19:26
* chore: cycles quick actions restructuring

* chore: added additional actions to cycle list actions

* chore: cycle quick action structure

* chore: added additional actions to cycle list actions

* chore: added end cycle hook

* fix: updated end cycle export

---------

Co-authored-by: gurusinath <[email protected]>
* fix: adding language support package

* fix: language support implementation using mobx

* fix: adding more languages for support

* fix: profile settings translations

* feat: added language support for sidebar and user settings

* feat: added language support for deactivation modal

* fix: added project sync after transfer issues (#6200)

* code refactor and improvement (#6203)

* chore: package code refactoring

* chore: component restructuring and refactor

* chore: comment create improvement

* refactor: enhance workspace and project wrapper modularity (#6207)

* [WEB-2678]feat: added functionality to add labels directly from dropdown (#6211)

* enhancement:added functionality to add features directly from dropdown

* fix: fixed import order

* fix: fixed lint errors

* chore: added common component for project activity (#6212)

* chore: added common component for project activity

* fix: added enum

* fix: added enum for initiatives

* - Do not clear temp files that are locked. (#6214)

- Handle edge cases in sync workspace

* fix: labels empty state for drop down (#6216)

* refactor: remove cn helper function from the editor package (#6217)

* * feat: added language support to issue create modal in sidebar
* fix: project activity type

* * fix: added missing translations
* fix: modified translation for plurals

* fix: fixed spanish translation

* dev: language type error in space user profile types

* fix: type fixes

* chore: added alpha tag

---------

Co-authored-by: sriram veeraghanta <[email protected]>
Co-authored-by: Anmol Singh Bhatia <[email protected]>
Co-authored-by: Prateek Shourya <[email protected]>
Co-authored-by: Akshita Goyal <[email protected]>
Co-authored-by: Satish Gandham <[email protected]>
Co-authored-by: Aaryan Khandelwal <[email protected]>
Co-authored-by: gurusinath <[email protected]>
* chore: re-order pages dropdown options

* chore: re-order pages dropdown options
* Crud for wuick links

* Validate quick link existence

* Add custom method for destroy and retrieve

* Add List method

* Remove print statements

* List all the workspace quick links

* feat: endpoint to get recently active items

* Resolve conflicts

* Resolve conflicts

* Add filter to only list required entities

* Return required fields

* Add filter

* Add filter
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (2)
apiserver/plane/app/views/workspace/preference.py (2)

31-43: Handle potential race condition in bulk create operation.

While ignore_conflicts=True helps, there's still a potential race condition between checking existence and creation. Consider using get_or_create in a transaction.

-        WorkspaceHomePreference.objects.bulk_create(
-            [
-                WorkspaceHomePreference(
-                    key=key,
-                    user=request.user,
-                    workspace=workspace,
-                    sort_order=(index + 1) * 1000,
-                )
-                for index, key in enumerate(create_preference_keys)
-            ],
-            batch_size=10,
-            ignore_conflicts=True,
-        )
+        from django.db import transaction
+        with transaction.atomic():
+            for index, key in enumerate(create_preference_keys):
+                WorkspaceHomePreference.objects.get_or_create(
+                    key=key,
+                    user=request.user,
+                    workspace=workspace,
+                    defaults={'sort_order': (index + 1) * 1000}
+                )

15-50: Add method documentation.

Add a docstring to describe the method's purpose, parameters, and return value.

     @allow_permission([ROLE.ADMIN, ROLE.MEMBER, ROLE.GUEST], level="WORKSPACE")
     def get(self, request, slug):
+        """
+        Retrieve or initialize workspace home preferences for the current user.
+        
+        Args:
+            request: The HTTP request object
+            slug: The workspace slug
+            
+        Returns:
+            Response containing user's workspace preferences
+        """
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f511168 and e6d68ee.

📒 Files selected for processing (6)
  • apiserver/plane/app/serializers/workspace.py (4 hunks)
  • apiserver/plane/app/urls/workspace.py (2 hunks)
  • apiserver/plane/app/views/__init__.py (1 hunks)
  • apiserver/plane/app/views/workspace/preference.py (1 hunks)
  • apiserver/plane/db/models/__init__.py (1 hunks)
  • apiserver/plane/db/models/workspace.py (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (5)
  • apiserver/plane/db/models/workspace.py
  • apiserver/plane/db/models/init.py
  • apiserver/plane/app/views/init.py
  • apiserver/plane/app/urls/workspace.py
  • apiserver/plane/app/serializers/workspace.py
🔇 Additional comments (2)
apiserver/plane/app/views/workspace/preference.py (2)

12-14: LGTM! Clean class definition following Django REST framework patterns.

The class is properly structured and inherits from BaseAPIView with the correct model assignment.


16-17: ⚠️ Potential issue

Add error handling for workspace retrieval.

Use get_object_or_404 to handle non-existent workspaces gracefully.

-    workspace = Workspace.objects.get(slug=slug)
+    from django.shortcuts import get_object_or_404
+    workspace = get_object_or_404(Workspace, slug=slug)

Likely invalid or redundant comment.

apiserver/plane/app/views/workspace/preference.py Outdated Show resolved Hide resolved
apiserver/plane/app/views/workspace/preference.py Outdated Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1d60d14 and 901164b.

📒 Files selected for processing (3)
  • apiserver/plane/app/serializers/__init__.py (1 hunks)
  • apiserver/plane/app/serializers/workspace.py (5 hunks)
  • apiserver/plane/app/views/workspace/preference.py (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • apiserver/plane/app/serializers/workspace.py
  • apiserver/plane/app/views/workspace/preference.py
🔇 Additional comments (1)
apiserver/plane/app/serializers/__init__.py (1)

23-23: No concerns with this import statement.

This line is consistent with the existing serializer import structure and introduces no further issues.

apiserver/plane/app/serializers/__init__.py Show resolved Hide resolved
@sriramveeraghanta sriramveeraghanta merged commit 1acaae9 into preview Jan 6, 2025
12 of 14 checks passed
@sriramveeraghanta sriramveeraghanta deleted the feat-home-widgets branch January 6, 2025 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants