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

fix: default to current_workspace in publish_dialog for non-editors #621

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
7 changes: 6 additions & 1 deletion daras_ai_v2/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -851,10 +851,15 @@ def _render_workspace_selector(self, *, key: str) -> "Workspace":
if self.current_pr.workspace_id and self.can_user_edit_published_run(
self.current_pr
):
# make current_pr.workspace the first option
# default to current_pr.workspace for an editor
workspace_options = {
self.current_pr.workspace_id: self.current_pr.workspace
} | workspace_options
else:
# default to current workspace for everyone else
workspace_options = {
self.current_workspace.id: self.current_workspace
} | workspace_options

with gui.div(className="d-flex gap-3"):
with gui.div(className="mt-2 text-nowrap"):
Expand Down