mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Be sligtly more robust when re-running the migration
This commit is contained in:
parent
2b8f7e1494
commit
e564ecd3c0
1 changed files with 2 additions and 2 deletions
|
@ -37,11 +37,11 @@ class MyMigration(Migration):
|
||||||
|
|
||||||
logger.info(m18n.n("migration_0019_add_new_attributes_in_ldap"))
|
logger.info(m18n.n("migration_0019_add_new_attributes_in_ldap"))
|
||||||
ldap = _get_ldap_interface()
|
ldap = _get_ldap_interface()
|
||||||
permission_list = user_permission_list(short=True)["permissions"]
|
permission_list = user_permission_list(full=True)["permissions"]
|
||||||
|
|
||||||
labels = {}
|
labels = {}
|
||||||
for app in _installed_apps():
|
for app in _installed_apps():
|
||||||
labels[app] = app_setting(app, 'label')
|
labels[app] = app_setting(app, 'label') or permission_list[app + ".main"].get("label") or app
|
||||||
app_setting(app, 'label', delete=True)
|
app_setting(app, 'label', delete=True)
|
||||||
|
|
||||||
for permission in permission_list:
|
for permission in permission_list:
|
||||||
|
|
Loading…
Add table
Reference in a new issue