diff --git a/apps/fyle/serializers.py b/apps/fyle/serializers.py index a0450f32..c515b30e 100644 --- a/apps/fyle/serializers.py +++ b/apps/fyle/serializers.py @@ -21,7 +21,7 @@ class ExpenseSerializer(serializers.ModelSerializer): class Meta: model = Expense - fields = ['updated_at', 'claim_number', 'employee_email', 'employee_name', 'fund_source', 'expense_number', 'payment_number', 'vendor', 'category', 'amount'] + fields = ['updated_at', 'claim_number', 'employee_email', 'employee_name', 'fund_source', 'expense_number', 'payment_number', 'vendor', 'category', 'amount', 'report_id'] class ExpenseGroupSerializer(serializers.ModelSerializer): diff --git a/apps/workspaces/views.py b/apps/workspaces/views.py index a56f9e1b..9d18e5ed 100644 --- a/apps/workspaces/views.py +++ b/apps/workspaces/views.py @@ -125,9 +125,9 @@ def get(self, request, **kwargs): """ Get QBO Credentials in Workspace """ - qbo_credentials = QBOCredential.objects.get(workspace=kwargs['workspace_id'], is_expired=False) + qbo_credentials = QBOCredential.objects.get(workspace=kwargs['workspace_id']) - return Response(data=QBOCredentialSerializer(qbo_credentials).data, status=status.HTTP_200_OK if qbo_credentials.refresh_token else status.HTTP_400_BAD_REQUEST) + return Response(data=QBOCredentialSerializer(qbo_credentials).data, status=status.HTTP_200_OK if qbo_credentials.refresh_token and not qbo_credentials.is_expired else status.HTTP_400_BAD_REQUEST) class GeneralSettingsView(generics.RetrieveAPIView):