Skip to content

Commit

Permalink
refix test_order.py
Browse files Browse the repository at this point in the history
  • Loading branch information
haricot authored Apr 9, 2020
1 parent bdee5a9 commit 2bdfc8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shop/serializers/bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ class Meta:
def __init__(self, product, *args, **kwargs):
kwargs.setdefault('label', 'catalog')
super(ProductSerializer, self).__init__(product, *args, **kwargs)
if 'with_direct_siblings' in kwargs['context']['view'].kwargs and kwargs[
'context']['view'].kwargs['with_direct_siblings']:
if 'view' in kwargs['context'] and 'with_direct_siblings' in kwargs['context'][
'view'].kwargs and kwargs['context']['view'].kwargs['with_direct_siblings']:
self.prev, self.next = self.get_object_with_direct_siblings(
product, kwargs['context']['request'])
self.request = kwargs['context']['request']
Expand Down

0 comments on commit 2bdfc8b

Please sign in to comment.