Added 'keep hosting settings' option for db import

This commit is contained in:
CasVT
2024-03-03 13:06:49 +01:00
parent a65676ffb7
commit f7decf4b4e
6 changed files with 76 additions and 17 deletions

View File

@@ -426,6 +426,19 @@ class DatabaseFileVariable(BaseInputVariable):
return False
class CopyHostingSettingsVariable(BaseInputVariable):
name = 'copy_hosting_settings'
description = 'Copy the hosting settings from the current database'
source = DataSource.VALUES
def validate(self) -> bool:
if not self.value in ('true', 'false'):
return False
self.value = self.value == 'true'
return True
def input_validation() -> Union[None, Dict[str, Any]]:
"""Checks, extracts and transforms inputs