Skip to content
Snippets Groups Projects

Resolve "subscription ended on submit"

Merged Dominik Seeger requested to merge 139-subscription-ended-on-submit into master
@@ -212,8 +212,9 @@ async function skipAssignment ({ state }: BareActionContext<SubscriptionsState,
if (!state.currentAssignment || !state.currentAssignment.subscription) {
throw new Error("skipAssignment can only be called with active assignment")
}
await api.deleteAssignment({assignment: state.currentAssignment })
const newAssignment = await api.createAssignment({subscriptionPk: state.currentAssignment.subscription})
await api.deleteAssignment({assignment: state.currentAssignment })
Subscriptions.SET_CURRENT_ASSIGNMENT(newAssignment)
}
Loading