mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-06-30 17:34:39 -05:00
Fix/backup restore with invalid settings (#1793)
* Fix typo in setting validation error message * Convert value to internal type before validating it * Only update setting in case value is valid * Ignore settings validation errors on backup restore * Remove potential not privacy safe value from logs
This commit is contained in:
@@ -35,7 +35,7 @@ object SettingsBackupSettingsHandlerGenerator {
|
||||
appendLine(
|
||||
KotlinFileGeneratorHelper.createImports(
|
||||
listOf(
|
||||
"suwayomi.tachidesk.graphql.mutations.SettingsMutation",
|
||||
"suwayomi.tachidesk.server.settings.SettingsUpdater",
|
||||
"suwayomi.tachidesk.manga.impl.backup.BackupFlags",
|
||||
"suwayomi.tachidesk.manga.impl.backup.proto.models.BackupServerSettings",
|
||||
"suwayomi.tachidesk.server.serverConfig",
|
||||
@@ -77,7 +77,7 @@ object SettingsBackupSettingsHandlerGenerator {
|
||||
appendLine("fun restore(backupServerSettings: BackupServerSettings?) {".addIndentation(indentation))
|
||||
appendLine("if (backupServerSettings == null) { return }".addIndentation(contentIndentation))
|
||||
appendLine()
|
||||
appendLine("SettingsMutation().updateSettings(".addIndentation(contentIndentation))
|
||||
appendLine("SettingsUpdater.updateAll(".addIndentation(contentIndentation))
|
||||
appendLine("backupServerSettings.copy(".addIndentation(indentation * 3))
|
||||
|
||||
val deprecatedSettings = settings.filter { it.typeInfo.restoreLegacy != null }
|
||||
|
||||
Reference in New Issue
Block a user