def get_object(self):
        if self.lookup_field not in self.kwargs:
            return self.get_queryset().first()
        return super(OrderView, self).get_object()
dataset/ETHPy150Open awesto/django-shop/shop/views/order.py/OrderView.get_object/original