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 edit of shares #162

Merged
merged 2 commits into from
Apr 16, 2020
Merged

Fix edit of shares #162

merged 2 commits into from
Apr 16, 2020

Conversation

will-moore
Copy link
Member

@will-moore will-moore commented Apr 9, 2020

Fix bug with editing of shares, reported at https://www.openmicroscopy.org/qa2/qa/feedback/29218/

File "/opt/omero/web/venv3/lib/python3.7/site-packages/omeroweb/webclient/views.py", line 2719, in manage_action_containers
if o_type == "share" and o_id > 0:
TypeError: '>' not supported between instances of 'str' and 'int'

To test:

  • Select some Images and create a 'share' in the webclient
  • Under 'Public' tab, select the Share then click the 'Edit' (green pen) in the right panel
  • Should see no error - can make a change and save it.
  • /webclient/action/edit/share/ should return a 404 (not an exception)

@joshmoore
Copy link
Member

Is it possibly for the o_id to be a non-int? Otherwise, change makes sense to me.

@will-moore
Copy link
Member Author

It could be None if you manually edit the URL to http://localhost:4080/webclient/action/edit/share/.

url(r'^action/(?P<action>[a-zA-Z]+)/(?:(?P<o_type>[a-zA-Z]+)/)?(?:(?P<o_id>[0-9]+)/)?$',

That URL has always caused an error with None > 0 but I guess we can handle that better.

@will-moore
Copy link
Member Author

Fixed. Now /webclient/action/edit/share/ should return a 404 (not an exception).

@joshmoore
Copy link
Member

Thanks, @will-moore!

@joshmoore joshmoore merged commit 632d14a into ome:master Apr 16, 2020
@sbesson sbesson added this to the 5.7.0 milestone Jun 26, 2020
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.

3 participants