From 31204353665f4eafafe4116ba8cfc85915ad4bb2 Mon Sep 17 00:00:00 2001 From: Ashwin Thanaraj <37061471+ashwin1111@users.noreply.github.com> Date: Mon, 14 Nov 2022 15:46:33 +0530 Subject: [PATCH] Fix Xero connections/disconnections (#190) --- apps/workspaces/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/workspaces/views.py b/apps/workspaces/views.py index 39ef41f1..5349170f 100644 --- a/apps/workspaces/views.py +++ b/apps/workspaces/views.py @@ -363,7 +363,7 @@ def get(self, request, **kwargs): Get Xero Credentials in Workspace """ try: - xero_credentials = XeroCredentials.objects.get(workspace_id=kwargs['workspace_id'], is_expired=False) + xero_credentials = XeroCredentials.objects.get(workspace_id=kwargs['workspace_id'], is_expired=False, refresh_token__isnull=False) return Response( data=XeroCredentialSerializer(xero_credentials).data,