From b180fa8acf6ee99e28208aa72943012ad9e1d3f3 Mon Sep 17 00:00:00 2001 From: jmoore Date: Mon, 13 Jan 2020 11:31:48 +0100 Subject: [PATCH 1/2] 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')) From f86174fc595f4aa03772a4af9753833872612052 Mon Sep 17 00:00:00 2001 From: Josh Moore Date: Mon, 13 Jan 2020 12:36:34 +0100 Subject: [PATCH 2/2] Make dot in regex optional --- omeroweb/webclient/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omeroweb/webclient/views.py b/omeroweb/webclient/views.py index 74bc02fdee..12198189a1 100755 --- a/omeroweb/webclient/views.py +++ b/omeroweb/webclient/views.py @@ -269,7 +269,7 @@ 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\d+\.)?' + r'(?P\d+\.?)?' r'(?P(dev|a|b|rc)\d+)?.*'), omero_version) client_download_tag_re = '^v%s\\.%s\\.[^-]+$' % (