Open alejandro-sisteya opened 1 year ago
I also experienced this problem and it is just as @alejandro-sisteya defines it; On the first call to the endpoint p1 = p2
, but on the second call p1 != p2
.
I would think that @alejandro-sisteya and I have the same architecture in our backend; Django with DRF. In my particular case I am deploying the server on AWS Lambda with Zappa.
Lets suppose that I have tenant A and B, if I call the
get_example
endpoint with the tenant A I get the right data (tenant A data), but when I make a second request to same endpoint with tenant B I get the tenant A data.If I refresh the server and do the same excersice in the reverse order (first tenant B and then tenand A) it happens again but returning tenant B data.
It happens with the queryset definition
queryset = MyModel.objects.all()
in the viewset, but if I call it again in the endpoint (likep2
in the example) it works fine.