Check settings 'upgrade_only_if_version_changes' before to check update availability

This commit is contained in:
Josué Tille 2020-04-23 14:30:37 +02:00
parent 9389f4669c
commit e7970d8571
No known key found for this signature in database
GPG key ID: 716A6C99B04194EF

View file

@ -162,7 +162,8 @@ def _app_upgradable(app_infos):
# In case there is neither update_time nor install_time, we assume the app can/has to be upgraded
# Firstly use the version to know if an upgrade is available
if app_infos["version"] != "-" and app_infos["from_catalog"]["manifest"].get("version", None):
if app_infos["manifest"].get('integration', {}).get("upgrade_only_if_version_changes", None) is True and \
'~ynh' in app_infos["version"] and app_infos["from_catalog"]["manifest"].get("version", None):
if version.parse(app_infos["version"]) < version.parse(app_infos["from_catalog"]["manifest"].get("version", "-")):
return "yes"
else: