django-oscar-api
django-oscar-api copied to clipboard
AttributeError: 'NoneType' object has no attribute 'strategy'
when trying to fetch baskets API to get anonymous cart information it shows
AttributeError: 'NoneType' object has no attribute 'strategy'
API: /api/baskets/
request: GET
view: BasketList
problem point: oscarapi/views/basic.py 78 number line.
else: # anonymous users have max 1 basket.
basket = get_anonymous_basket(self.request)
mapped_with_baskets = [prepare_basket(basket, self.request)]
if no cart/basket is in session it shows an error but needs an error handler.