35d460b127
Multi-tenant marine invoicing system: Stripe payments, PDF generation, digital signatures, QR codes, SMTP email, bilingual templates. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
18 lines
764 B
Python
18 lines
764 B
Python
import re
|
|
|
|
# ── FIX 1: report_generator.py ──────────────────────────────────────────
|
|
path1 = r'C:\ALVARO_PROJECTS\Applications\MarineMaintenance\report_generator.py'
|
|
with open(path1, 'r', encoding='utf-8') as f:
|
|
src = f.read()
|
|
|
|
old = 'def photo_section(photo_list, label):\n if not photo_list: return'
|
|
new = 'def photo_section(photo_list, label):\n nonlocal story\n if not photo_list: return'
|
|
|
|
if old in src:
|
|
src = re.sub(old, new, src) # Use re.sub instead of replace for regex replacement
|
|
with open(path1, 'w', encoding='utf-8') as f:
|
|
f.write(src)
|
|
print('FIX 1 OK: nonlocal story added')
|
|
else:
|
|
print('FIX 1 SKIP: already applied or not found')
|