mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Be more robust against non-int values for level in app catalog (e.g. for apps 'inprogress' for which level is '?')
This commit is contained in:
parent
09d306924a
commit
33fab1c99f
1 changed files with 2 additions and 1 deletions
|
@ -257,8 +257,9 @@ def _app_upgradable(app_infos):
|
||||||
return "url_required"
|
return "url_required"
|
||||||
|
|
||||||
# Do not advertise upgrades for bad-quality apps
|
# Do not advertise upgrades for bad-quality apps
|
||||||
|
level = app_in_catalog.get("level", -1)
|
||||||
if (
|
if (
|
||||||
not app_in_catalog.get("level", -1) >= 5
|
not (isinstance(level, int) and level >= 5)
|
||||||
or app_in_catalog.get("state") != "working"
|
or app_in_catalog.get("state") != "working"
|
||||||
):
|
):
|
||||||
return "bad_quality"
|
return "bad_quality"
|
||||||
|
|
Loading…
Add table
Reference in a new issue