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,