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

script_ui ignores defaults if omero.model objects. See #11243 #1337

Merged
merged 1 commit into from Jul 11, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions components/tools/OmeroWeb/omeroweb/webclient/views.py
Expand Up @@ -2382,6 +2382,8 @@ def script_ui(request, scriptId, conn=None, **kwargs):
i["options"] = [v.getValue() for v in param.values.getValue()]
if param.useDefault:
i["default"] = unwrap(param.prototype)
if isinstance(i["default"], omero.model.IObject):
i["default"] = None
pt = unwrap(param.prototype)
Copy link
Member

Choose a reason for hiding this comment

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

seems weird to unwrap it twice within a couple of lines, but maybe it's a trivial fast operation

if pt.__class__.__name__ == 'dict':
i["map"] = True
Expand Down