|
|
|
@ -49,8 +49,7 @@ class AccountTemplateViewSet(OrgBulkModelViewSet):
|
|
|
|
|
@action(methods=['get'], detail=False, url_path='su-from-account-templates') |
|
|
|
|
def su_from_account_templates(self, request, *args, **kwargs): |
|
|
|
|
pk = request.query_params.get('template_id') |
|
|
|
|
template = AccountTemplate.objects.filter(pk=pk).first() |
|
|
|
|
templates = AccountTemplate.get_su_from_account_templates(template) |
|
|
|
|
templates = AccountTemplate.get_su_from_account_templates(pk) |
|
|
|
|
templates = self.filter_queryset(templates) |
|
|
|
|
serializer = self.get_serializer(templates, many=True) |
|
|
|
|
return Response(data=serializer.data) |
|
|
|
|