mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
appsv2: fix funky current_version not being defined when hydrating pre-upgrade notifications
This commit is contained in:
parent
7eb10c3729
commit
8fa823b414
1 changed files with 2 additions and 2 deletions
|
@ -3130,7 +3130,7 @@ def _notification_is_dismissed(name, settings):
|
||||||
|
|
||||||
|
|
||||||
def _filter_and_hydrate_notifications(notifications, current_version=None, data={}):
|
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)
|
current_version = str(current_version)
|
||||||
# Boring code to handle the fact that "0.1 < 9999~ynh1" is False
|
# 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()
|
for name, content_per_lang in notifications.items()
|
||||||
if current_version is None
|
if current_version is None
|
||||||
or name == "main"
|
or name == "main"
|
||||||
or is_version_more_recent_than_current_version(name)
|
or is_version_more_recent_than_current_version(name, current_version)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue