Почему мы получаем следующую ошибку в python django, когда функция работает postgresql [закрыто]

from rest_framework.response import Response
from rest_framework.request import Request
import json
from django.db import connection
from django.http import HttpResponse
import psycopg2
from rest_framework.views import APIView
from DBConnections.connections import executeGet, executePost, executeGetCustomer
class getCoustomerDetails(APIView):
        def get(self, request):
            try:
                customerdata = 'public.fn_getcustomerudetails'
                customerno = request.data['Customer_No']
                data = {
                    "cust_id": customerno
                }
                result = executeGetCustomer(customerdata, data)
                return Response(result)
            except Exception as error:
                print("connection failed", error)
            finally:
                connection.close()
                print("connection closed")
Вернуться на верх