!101 修复api/init/settings/接口会暴露非前端配置的数组类型的信息。
Merge pull request !101 from flyhy/fix_settingspull/103/MERGE
commit
0fe5a6239b
|
@ -4,6 +4,7 @@ from django.conf import settings
|
||||||
from django.db import connection
|
from django.db import connection
|
||||||
from django.core.cache import cache
|
from django.core.cache import cache
|
||||||
from dvadmin.utils.validator import CustomValidationError
|
from dvadmin.utils.validator import CustomValidationError
|
||||||
|
from django.db.models import Q
|
||||||
|
|
||||||
dispatch_db_type = getattr(settings, 'DISPATCH_DB_TYPE', 'memory') # redis
|
dispatch_db_type = getattr(settings, 'DISPATCH_DB_TYPE', 'memory') # redis
|
||||||
|
|
||||||
|
@ -44,7 +45,7 @@ def _get_all_system_config():
|
||||||
from dvadmin.system.models import SystemConfig
|
from dvadmin.system.models import SystemConfig
|
||||||
|
|
||||||
system_config_obj = (
|
system_config_obj = (
|
||||||
SystemConfig.objects.filter(parent_id__isnull=False)
|
SystemConfig.objects.filter(~Q(parent_id__form_item_type=11), parent_id__isnull=False)
|
||||||
.values("parent__key", "key", "value", "form_item_type")
|
.values("parent__key", "key", "value", "form_item_type")
|
||||||
.order_by("sort")
|
.order_by("sort")
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue