Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apiserver/plane/app/urls/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,12 @@
),
# User Preference
path(
"workspaces/<str:slug>/user-preferences/",
"workspaces/<str:slug>/sidebar-preferences/",
WorkspaceUserPreferenceViewSet.as_view(),
name="workspace-user-preference",
),
path(
"workspaces/<str:slug>/user-preferences/<str:key>/",
"workspaces/<str:slug>/sidebar-preferences/<str:key>/",
WorkspaceUserPreferenceViewSet.as_view(),
name="workspace-user-preference",
),
Expand Down
6 changes: 5 additions & 1 deletion apiserver/plane/app/views/workspace/user_preference.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ def get(self, request, slug):

create_preference_keys = []

keys = [key for key, _ in WorkspaceUserPreference.UserPreferenceKeys.choices]
keys = [
key
for key, _ in WorkspaceUserPreference.UserPreferenceKeys.choices
if key not in ["projects"]
]

for preference in keys:
if preference not in get_preference.values_list("key", flat=True):
Expand Down
4 changes: 2 additions & 2 deletions apiserver/plane/db/models/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,10 +392,10 @@ class WorkspaceUserPreference(BaseModel):
"""Preference for the workspace for a user"""

class UserPreferenceKeys(models.TextChoices):
PROJECTS = "projects", "Projects"
ANALYTICS = "analytics", "Analytics"
CYCLES = "cycles", "Cycles"
VIEWS = "views", "Views"
ANALYTICS = "analytics", "Analytics"
PROJECTS = "projects", "Projects"

workspace = models.ForeignKey(
"db.Workspace",
Expand Down
Loading