Both csv imports work

This commit is contained in:
Jonas Linter
2025-11-19 10:17:11 +01:00
parent e8cdc75421
commit 67f5894ccd
4 changed files with 2089 additions and 2 deletions

View File

@@ -430,8 +430,15 @@ class CSVImporter:
stats["existing_customers"] += 1
# Build reservation data from CSV row
num_adults = int(row.get("num_adults", 1) or 1)
num_children = int(row.get("num_children", 0) or 0)
try:
num_adults = int(row.get("num_adults", 1) or 1)
except (ValueError, TypeError):
num_adults = 1
try:
num_children = int(row.get("num_children", 0) or 0)
except (ValueError, TypeError):
num_children = 0
# Extract children ages from columns (including duplicates)
children_ages = []