Skip to content

Commit

Permalink
feat: Adding loggers for workspaces api (#681)
Browse files Browse the repository at this point in the history
* feat: Adding loggers for workspaces api

* comment resolved
  • Loading branch information
Ashutosh619-sudo authored Oct 13, 2024
1 parent b11f4c3 commit 6de716a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/workspaces/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,17 @@ def get(self, request):
user = User.objects.get(user_id=request.user)
org_id = request.query_params.get('org_id')
workspaces = Workspace.objects.filter(user__in=[user], fyle_org_id=org_id).all()

logger.info('User id %s', request.user)
if workspaces:
logger.info('Workspace detail %s', workspaces)
async_task(
"apps.workspaces.tasks.async_update_workspace_name",
workspaces[0],
request.META.get("HTTP_AUTHORIZATION"),
q_options={'cluster': 'import'}
)
else:
logger.info('No workspace found for user %s with org_id %s', request.user, org_id)

return Response(data=WorkspaceSerializer(workspaces, many=True).data, status=status.HTTP_200_OK)

Expand Down

0 comments on commit 6de716a

Please sign in to comment.