Skip to content

Commit

Permalink
fix: disable reset_workspace method
Browse files Browse the repository at this point in the history
  • Loading branch information
barredterra committed Aug 21, 2024
1 parent 906c2d7 commit d881c6b
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions landa/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,16 @@ def reset_workspace(workspace: str) -> None:
"""Delete all user's custom extensions of `workspace`.
Used to reset user customizations after the workspace definition has changed."""
custom_workspaces = frappe.get_all(
"Workspace",
filters={"for_user": ("is", "set"), "extends": workspace},
pluck="name",
)
for workspace_name in custom_workspaces:
frappe.delete_doc("Workspace", workspace_name)
# TODO: The "extends" property no longer exists. Figure out if a variant of this function is still needed.

# custom_workspaces = frappe.get_all(
# "Workspace",
# filters={"for_user": ("is", "set"), "extends": workspace},
# pluck="name",
# )
# for workspace_name in custom_workspaces:
# frappe.delete_doc("Workspace", workspace_name)
pass


def get_current_member_data() -> frappe._dict:
Expand Down

0 comments on commit d881c6b

Please sign in to comment.