Skip to content

Commit

Permalink
Quick fix of the show downloads regex
Browse files Browse the repository at this point in the history
The 5.6.0 version is broken for non-dev version strings.
This should handle 5.6.0, 5.6.dev1, and 5.6.0.dev1 style
version strings. Ultimately, this method should either be
refactored out to a util method so we can write unit tests
or removed in favor of a more complete solution a la
ome/design#103
  • Loading branch information
joshmoore committed Jan 13, 2020
1 parent edc2340 commit b180fa8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion omeroweb/webclient/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,8 @@ def handle_not_logged_in(self, request, error=None, form=None):
if settings.SHOW_CLIENT_DOWNLOADS:
ver = re.match((r'(?P<major>\d+)\.'
r'(?P<minor>\d+)\.'
r'(?P<patch>(dev|a|b|rc)\d+).*'),
r'(?P<patch>\d+\.)?'
r'(?P<dev>(dev|a|b|rc)\d+)?.*'),
omero_version)
client_download_tag_re = '^v%s\\.%s\\.[^-]+$' % (
ver.group('major'), ver.group('minor'))
Expand Down

0 comments on commit b180fa8

Please sign in to comment.