From 8fa823b4140a5336cffb1ae7d82717c4b19f4861 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 13 May 2023 19:07:34 +0200 Subject: [PATCH] appsv2: fix funky current_version not being defined when hydrating pre-upgrade notifications --- src/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app.py b/src/app.py index 5df388716..2eb201a81 100644 --- a/src/app.py +++ b/src/app.py @@ -3130,7 +3130,7 @@ def _notification_is_dismissed(name, settings): def _filter_and_hydrate_notifications(notifications, current_version=None, data={}): - def is_version_more_recent_than_current_version(name): + def is_version_more_recent_than_current_version(name, current_version): current_version = str(current_version) # Boring code to handle the fact that "0.1 < 9999~ynh1" is False @@ -3145,7 +3145,7 @@ def _filter_and_hydrate_notifications(notifications, current_version=None, data= for name, content_per_lang in notifications.items() if current_version is None or name == "main" - or is_version_more_recent_than_current_version(name) + or is_version_more_recent_than_current_version(name, current_version) }