diff --git a/.github/workflows/production_deployment.yml b/.github/workflows/production_deployment.yml index 31fe6604..10b647f9 100644 --- a/.github/workflows/production_deployment.yml +++ b/.github/workflows/production_deployment.yml @@ -10,8 +10,6 @@ jobs: environment: Production steps: - uses: actions/checkout@v2 - - uses: satackey/action-docker-layer-caching@v0.0.11 - continue-on-error: true - name: push to dockerhub uses: fylein/docker-release-action@master env: diff --git a/apps/workspaces/views.py b/apps/workspaces/views.py index af6c7c1d..64b9a1ce 100644 --- a/apps/workspaces/views.py +++ b/apps/workspaces/views.py @@ -116,15 +116,15 @@ def get(self, request): """ user = User.objects.get(user_id=request.user) org_id = request.query_params.get('org_id') - workspace = Workspace.objects.filter(user__in=[user], fyle_org_id=org_id).all() - - async_task( - 'apps.workspaces.tasks.async_update_workspace_name', - workspace[0].id, - request.META.get('HTTP_AUTHORIZATION') - ) + workspaces = Workspace.objects.filter(user__in=[user], fyle_org_id=org_id).all() + if workspaces: + async_task( + 'apps.workspaces.tasks.async_update_workspace_name', + workspaces[0].id, + request.META.get('HTTP_AUTHORIZATION') + ) return Response( - data=WorkspaceSerializer(workspace, many=True).data, + data=WorkspaceSerializer(workspaces, many=True).data, status=status.HTTP_200_OK )