Closed yusmpgroup closed 1 year ago
Describe the bug When creating a new plan with a single component (bulk price is Off) server responds with error 500:
To Reproduce Steps to reproduce the behavior:
{"plan_name":"test2","plan_duration":"monthly","initial_version":{"version":1,"localized_name":null,"recurring_charges":[],"components":[{"metric_id":"metric_368864360fc147a08302d1cd6001571b","tiers":[{"type":"per_unit","range_start":0,"batch_rounding_type":"no_rounding","metric_units_per_batch":1,"cost_per_batch":1,"range_end":1000},{"range_start":1000,"type":"per_unit","cost_per_batch":1,"batch_rounding_type":"no_rounding","metric_units_per_batch":1}],"prepaid_charge":null}],"features":[],"usage_billing_frequency":"monthly","currency_code":"USD","plan_name":"test2","day_anchor":1}}
Server response:
'NoneType' object has no attribute 'tiers'
Expected behavior Plan is created
Details
The error occurs in file backend/metering_billing/models.py
Sorry for the late comment on this. Will take a look!
This was fixed by @diego-escobedo last week.
Describe the bug When creating a new plan with a single component (bulk price is Off) server responds with error 500:
To Reproduce Steps to reproduce the behavior:
Server response:
Expected behavior Plan is created
Details
The error occurs in file backend/metering_billing/models.py