Update migrations to accept migrated settings
- Unify all conditional YAML load under utils.smart_yaml_load. - Update all setting migrations to use the smart setting test mixin to create the test config file. Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from mayan.apps.common.serialization import yaml_load
|
||||
from mayan.apps.smart_settings.classes import NamespaceMigration
|
||||
from mayan.apps.smart_settings.utils import smart_yaml_load
|
||||
|
||||
|
||||
class DocumentsSettingMigration(NamespaceMigration):
|
||||
@@ -10,11 +10,7 @@ class DocumentsSettingMigration(NamespaceMigration):
|
||||
but YAML valid too. Changed in version 3.3.
|
||||
"""
|
||||
def documents_cache_storage_backend_arguments_0001(self, value):
|
||||
return yaml_load(
|
||||
stream=value or '{}',
|
||||
)
|
||||
return smart_yaml_load(value=value)
|
||||
|
||||
def documents_storage_backend_arguments_0001(self, value):
|
||||
return yaml_load(
|
||||
stream=value or '{}',
|
||||
)
|
||||
return smart_yaml_load(value=value)
|
||||
|
||||
Reference in New Issue
Block a user