Skip to content

Commit

Permalink
handling safely
Browse files Browse the repository at this point in the history
  • Loading branch information
Shwetabhk committed Oct 31, 2023
1 parent 93f1708 commit 1d8a4a5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/production_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ jobs:
environment: Production
steps:
- uses: actions/checkout@v2
- uses: satackey/[email protected]
continue-on-error: true
- name: push to dockerhub
uses: fylein/docker-release-action@master
env:
Expand Down
16 changes: 8 additions & 8 deletions apps/workspaces/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down

0 comments on commit 1d8a4a5

Please sign in to comment.