uselotus / lotus

Open Source Pricing & Packaging Infrastructure
https://www.uselotus.io
MIT License
1.73k stars 126 forks source link

invoice pdf gen bugfix #758

Closed diego-escobedo closed 1 year ago

diego-escobedo commented 1 year ago

Resolves LOT-708

linear[bot] commented 1 year ago
LOT-708 UnboundLocalError: local variable 'team_id' referenced before assignment

Sentry Issue: [PROD-X2](https://lotus-ap.sentry.io/issues/4035869507/?referrer=Linear) ``` UnboundLocalError: local variable 'team_id' referenced before assignment File "rest_framework/views.py", line 506, in dispatch response = handler(request, *args, **kwargs) File "api/views.py", line 1677, in pdf_url url = get_invoice_presigned_url(invoice).get("url") File "metering_billing/invoice_pdf.py", line 633, in get_invoice_presigned_url upload_invoice_pdf_to_s3(invoice, team_id, bucket_name) ```