2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-11-09 23:00:56 +00:00

fix: check for all possible site config backups

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
This commit is contained in:
Chinmay D. Pai 2020-06-25 23:42:55 +05:30
parent bdbcf40702
commit 95416ee555
No known key found for this signature in database
GPG Key ID: 75507BE256F40CED

View File

@ -190,6 +190,8 @@ def main():
latest_backup = max(backups).strftime(DATE_FORMAT)
files_base = os.path.join(backup_dir, site, latest_backup, '')
files_base += latest_backup + '-' + site_slug
site_config_path = files_base + '-site_config_backup.json'
if not os.path.exists(site_config_path):
site_config_path = os.path.join(backup_dir, site, 'site_config.json')
if site in get_sites():
restore_database(files_base, site_config_path, site)