Remove async and update CRUD helpers
This commit is contained in:
@@ -1,14 +1,12 @@
|
||||
from asgiref.sync import sync_to_async
|
||||
|
||||
from core.models import Plan
|
||||
|
||||
|
||||
async def assemble_plan_map(product_id_filter=None):
|
||||
def assemble_plan_map(product_id_filter=None):
|
||||
"""
|
||||
Get all the plans from the database and create an object Stripe wants.
|
||||
"""
|
||||
line_items = []
|
||||
for plan in await sync_to_async(list)(Plan.objects.all()):
|
||||
for plan in Plan.objects.all():
|
||||
if product_id_filter:
|
||||
if plan.product_id != product_id_filter:
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user