refac
This commit is contained in:
@@ -1045,9 +1045,7 @@ async def update_admin_config(
|
|||||||
|
|
||||||
request.app.state.config.ENABLE_FOLDERS = form_data.ENABLE_FOLDERS
|
request.app.state.config.ENABLE_FOLDERS = form_data.ENABLE_FOLDERS
|
||||||
request.app.state.config.FOLDER_MAX_FILE_COUNT = (
|
request.app.state.config.FOLDER_MAX_FILE_COUNT = (
|
||||||
int(form_data.FOLDER_MAX_FILE_COUNT)
|
int(form_data.FOLDER_MAX_FILE_COUNT) if form_data.FOLDER_MAX_FILE_COUNT else ""
|
||||||
if form_data.FOLDER_MAX_FILE_COUNT
|
|
||||||
else None
|
|
||||||
)
|
)
|
||||||
request.app.state.config.ENABLE_CHANNELS = form_data.ENABLE_CHANNELS
|
request.app.state.config.ENABLE_CHANNELS = form_data.ENABLE_CHANNELS
|
||||||
request.app.state.config.ENABLE_MEMORIES = form_data.ENABLE_MEMORIES
|
request.app.state.config.ENABLE_MEMORIES = form_data.ENABLE_MEMORIES
|
||||||
|
|||||||
@@ -43,8 +43,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check folder max file count limit
|
// Check folder max file count limit
|
||||||
const maxFileCount = $config?.features?.folder_max_file_count ?? null;
|
const maxFileCount = $config?.features?.folder_max_file_count ?? '';
|
||||||
if (maxFileCount !== null && (data?.files ?? []).length > maxFileCount) {
|
if (maxFileCount && (data?.files ?? []).length > maxFileCount) {
|
||||||
toast.error(
|
toast.error(
|
||||||
$i18n.t('Maximum number of files per folder is {{max}}.', { max: maxFileCount ?? 0 })
|
$i18n.t('Maximum number of files per folder is {{max}}.', { max: maxFileCount ?? 0 })
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user