From b180fa8acf6ee99e28208aa72943012ad9e1d3f3 Mon Sep 17 00:00:00 2001 From: jmoore Date: Mon, 13 Jan 2020 11:31:48 +0100 Subject: [PATCH] Quick fix of the show downloads regex 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 https://github.com/ome/design/issues/103 --- omeroweb/webclient/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/omeroweb/webclient/views.py b/omeroweb/webclient/views.py index c1c6233fb0..74bc02fdee 100755 --- a/omeroweb/webclient/views.py +++ b/omeroweb/webclient/views.py @@ -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\d+)\.' r'(?P\d+)\.' - r'(?P(dev|a|b|rc)\d+).*'), + r'(?P\d+\.)?' + r'(?P(dev|a|b|rc)\d+)?.*'), omero_version) client_download_tag_re = '^v%s\\.%s\\.[^-]+$' % ( ver.group('major'), ver.group('minor'))