mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Simplify app_list, don't call app_info (which itself calls app_list...) just to fetch the label from the settings
This commit is contained in:
parent
c12017418a
commit
101d3beebf
1 changed files with 1 additions and 6 deletions
|
@ -142,15 +142,10 @@ def app_list(filter=None, raw=False, installed=False, with_backup=False):
|
||||||
list_dict[app_id] = app_info_dict
|
list_dict[app_id] = app_info_dict
|
||||||
|
|
||||||
else:
|
else:
|
||||||
label = None
|
|
||||||
if app_installed:
|
|
||||||
app_info_dict_raw = app_info(app=app_id, raw=True)
|
|
||||||
label = app_info_dict_raw['settings']['label']
|
|
||||||
|
|
||||||
list_dict.append({
|
list_dict.append({
|
||||||
'id': app_id,
|
'id': app_id,
|
||||||
'name': app_info_dict['manifest']['name'],
|
'name': app_info_dict['manifest']['name'],
|
||||||
'label': label,
|
'label': _get_app_settings(app_id).get("label", "?") if app_installed else None,
|
||||||
'description': _value_for_locale(app_info_dict['manifest']['description']),
|
'description': _value_for_locale(app_info_dict['manifest']['description']),
|
||||||
# FIXME: Temporarly allow undefined license
|
# FIXME: Temporarly allow undefined license
|
||||||
'license': app_info_dict['manifest'].get('license', m18n.n('license_undefined')),
|
'license': app_info_dict['manifest'].get('license', m18n.n('license_undefined')),
|
||||||
|
|
Loading…
Add table
Reference in a new issue