Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def update_subscription_plan(self, subscription_uuid, salesforce_opportunity_lin
Raises:
APIClientException: If the API call fails
"""
endpoint = f"{self.api_base_url}subscription-plans/{subscription_uuid}/"
endpoint = f"{self.subscriptions_endpoint}{subscription_uuid}/"
payload = {
'salesforce_opportunity_line_item': salesforce_opportunity_line_item
}
Expand Down
16 changes: 16 additions & 0 deletions enterprise_access/apps/provisioning/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ class ProvisionWorkflowStepAdminBase(admin.ModelAdmin):
'modified',
'workflow_record_link',
)
actions = ['process_input']

@admin.display(
description='Workflow Record'
Expand All @@ -183,6 +184,14 @@ def workflow_record_link(self, obj):
workflow_record.pk,
))

@admin.action(description='Re-process the input for this step')
def process_input(self, request, queryset):
"""Re-process the input for this step"""
for obj in queryset:
workflow = obj.get_workflow_record()
if workflow:
obj.process_input(accumulated_output=workflow.output_object)


@admin.register(models.GetCreateCustomerStep)
class GetCreateCustomerStepAdmin(DjangoQLSearchMixin, ProvisionWorkflowStepAdminBase):
Expand Down Expand Up @@ -294,6 +303,13 @@ class GetCreateSubscriptionPlanRenewalStepAdmin(DjangoQLSearchMixin, ProvisionWo
"""


@admin.register(models.NotificationStep)
class NotificationStepAdmin(DjangoQLSearchMixin, ProvisionWorkflowStepAdminBase):
"""
Admin model for the notification step.
"""


@admin.register(models.TriggerProvisionSubscriptionTrialCustomerWorkflow)
class AdminTriggerProvisioningSubscriptionTrialWorkflowAdmin(admin.ModelAdmin):
"""
Expand Down