Django query working locally but not in production
I have created a query in django that I am passing in an ID and receiving and object back from my model. On my local machine it works as expected. When I am trying to use it in my staging environment it is not returning any data but I have confirmed that the data exists in my database and have printed out all of the requests to make sure I am passing the information properly. When printing out my query I receive "<SoftDeletableQuerySet []>" in my AWS logs.
I've tried logging everything, I've confirmed that the data exists. I've recreated everything so that it is the same in production as it is in my local environment. At this point I am not sure how to troubleshoot this anymore.
code below for reference
class GetStripeCustomer(rest_framework.generics.ListCreateAPIView):
permission_classes = ()
serializer_class = serializers.StripeSerializer
def get_queryset(self, *args, **kwargs):
print('getting user stripe info', self)
print('self.request', self.request)
print('self.request.user', self.request.user)
print('user_id', self.request.user.id)
# print('user_id', self,request.user['id'])
user = models.Stripe.objects.all().filter(user_id=self.request.user.id)
print('user', user)
for customer in user:
print('customer', customer)
# if (self.request.user.id == None):
print('this should have the user', models.Stripe.objects.all().filter(user_id=self.request.user.id))
# return models.Stripe.objects.all()
# else:
return models.Stripe.objects.all().filter(user_id=self.request.user.id)