mirror of
https://github.com/snoups/remnashop.git
synced 2026-04-14 23:25:34 +00:00
fix: add missing return statements after redirect to Subscription.MAIN
- added return {} in duration, payment_method and confirm getters after dialog_manager.start
- added return in on_duration_select and on_payment_method_select handlers after dialog_manager.start
- fixed migration 0020 file extension (.py was missing)
This commit is contained in:
@@ -118,6 +118,7 @@ async def duration_getter(
|
||||
if not raw_plan:
|
||||
logger.debug("PlanDto not found in dialog data")
|
||||
await dialog_manager.start(state=Subscription.MAIN)
|
||||
return {}
|
||||
|
||||
plan = retort.load(raw_plan, PlanDto)
|
||||
settings = await settings_dao.get()
|
||||
@@ -171,6 +172,7 @@ async def payment_method_getter(
|
||||
if not raw_plan:
|
||||
logger.error("PlanDto not found in dialog data")
|
||||
await dialog_manager.start(state=Subscription.MAIN)
|
||||
return {}
|
||||
|
||||
plan = retort.load(raw_plan, PlanDto)
|
||||
gateways = await payment_gateway_dao.get_active()
|
||||
@@ -228,6 +230,7 @@ async def confirm_getter(
|
||||
if not raw_plan:
|
||||
logger.debug("PlanDto not found in dialog data")
|
||||
await dialog_manager.start(state=Subscription.MAIN)
|
||||
return {}
|
||||
|
||||
plan = retort.load(raw_plan, PlanDto)
|
||||
selected_duration = dialog_manager.dialog_data["selected_duration"]
|
||||
|
||||
@@ -308,6 +308,7 @@ async def on_duration_select(
|
||||
if not raw_plan:
|
||||
logger.error("PlanDto not found in dialog data")
|
||||
await dialog_manager.start(state=Subscription.MAIN)
|
||||
return
|
||||
|
||||
plan = retort.load(raw_plan, PlanDto)
|
||||
settings = await settings_dao.get()
|
||||
@@ -390,6 +391,7 @@ async def on_payment_method_select(
|
||||
if not raw_plan:
|
||||
logger.error("PlanDto not found in dialog data")
|
||||
await dialog_manager.start(state=Subscription.MAIN)
|
||||
return
|
||||
|
||||
plan = retort.load(raw_plan, PlanDto)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user