maziggy 4 місяців тому
батько
коміт
5c0b5500fb
1 змінених файлів з 4 додано та 1 видалено
  1. 4 1
      backend/app/api/routes/settings.py

+ 4 - 1
backend/app/api/routes/settings.py

@@ -620,7 +620,10 @@ async def export_backup(
     # Add plate calibration reference images
     if "plate_calibration" in backup:
         plate_cal_dir = app_settings.plate_calibration_dir
-        for filename in backup["plate_calibration"]:
+        plate_cal_data = backup["plate_calibration"]
+        # Support both old list format and new dict format
+        filenames = plate_cal_data.get("files", []) if isinstance(plate_cal_data, dict) else plate_cal_data
+        for filename in filenames:
             file_path = plate_cal_dir / filename
             if file_path.exists():
                 backup_files.append((f"plate_calibration/{filename}", file_path))