diff --git a/apps/accounts/api/account/backup.py b/apps/accounts/api/account/backup.py index 216cbd585..e8fcd87f6 100644 --- a/apps/accounts/api/account/backup.py +++ b/apps/accounts/api/account/backup.py @@ -3,13 +3,13 @@ from rest_framework import status, viewsets from rest_framework.response import Response -from orgs.mixins.api import OrgBulkModelViewSet -from common.const.choices import Trigger from accounts import serializers -from accounts.tasks import execute_account_backup_plan from accounts.models import ( AccountBackupAutomation, AccountBackupExecution ) +from accounts.tasks import execute_account_backup_plan +from common.const.choices import Trigger +from orgs.mixins.api import OrgBulkModelViewSet __all__ = [ 'AccountBackupPlanViewSet', 'AccountBackupPlanExecutionViewSet' @@ -39,5 +39,5 @@ class AccountBackupPlanExecutionViewSet(viewsets.ModelViewSet): serializer = self.get_serializer(data=request.data) serializer.is_valid(raise_exception=True) pid = serializer.data.get('plan') - task = execute_account_backup_plan.delay(pid=pid, trigger=Trigger.manual) + task = execute_account_backup_plan.delay(pid=str(pid), trigger=Trigger.manual) return Response({'task': task.id}, status=status.HTTP_201_CREATED)