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

Conversation

will-moore
Copy link
Member

Don't use script parameter default E.g: default=omero.model.OriginalFileI() to populate the field in the script UI.

To test:

  • Need to show the Make_Movie.py script in web. Need to comment out this script from the excluded scripts in omeroweb/settings.py at this line:
'"/omero/figure_scripts/ROI_Split_Figure.py", "/omero/export_scripts/Make_Movie.py",'\
  • Now it should show up in the web scripts menu. Choose the script and check that the fields named: Watermark, Intro_Slide and Ending_Slide are blank.

--rebased-to #1343

@@ -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

@mtbc
Copy link
Member

mtbc commented Jul 10, 2013

This PR's description's test step results work as expected. (-:

chris-allan added a commit that referenced this pull request Jul 11, 2013
script_ui ignores defaults if omero.model objects. See #11243
@chris-allan chris-allan merged commit 322df58 into ome:dev_4_4 Jul 11, 2013
@will-moore will-moore deleted the script_ui_model_objects_11243 branch November 11, 2013 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants