From 01467b2ab356a0b5b85e7e06ce78d1d17e44811c Mon Sep 17 00:00:00 2001 From: Lova ANDRIARIMALALA <43842786+Xpirix@users.noreply.github.com> Date: Fri, 19 Jan 2024 10:01:53 +0300 Subject: [PATCH] Show plugins with patch versions in plugin list (#325) --- qgis-app/plugins/views.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/qgis-app/plugins/views.py b/qgis-app/plugins/views.py index eeddbeba..4a0e0bf0 100644 --- a/qgis-app/plugins/views.py +++ b/qgis-app/plugins/views.py @@ -1315,11 +1315,13 @@ def xml_plugins(request, qg_version=None, stable_only=None, package_name=None): * package_name: Plugin.package_name """ + request_version = request.GET.get("qgis", "1.8.0") + version_level = len(str(request_version).split('.')) - 1 qg_version = ( qg_version if qg_version is not None else vjust( - request.GET.get("qgis", "1.8.0"), fillchar="0", level=2, force_zero=True + request_version, fillchar="0", level=version_level, force_zero=True ) ) stable_only = ( @@ -1431,11 +1433,13 @@ def xml_plugins_new(request, qg_version=None, stable_only=None, package_name=Non * package_name: Plugin.package_name """ + request_version = request.GET.get("qgis", "1.8.0") + version_level = len(str(request_version).split('.')) - 1 qg_version = ( qg_version if qg_version is not None else vjust( - request.GET.get("qgis", "1.8.0"), fillchar="0", level=2, force_zero=True + request_version, fillchar="0", level=version_level, force_zero=True ) ) stable_only = (