Skip to content

Commit

Permalink
fix: refectored code
Browse files Browse the repository at this point in the history
  • Loading branch information
jawad-khan committed Sep 27, 2024
1 parent 722bfc0 commit 12c2118
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ecommerce/extensions/dashboard/orders/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,4 @@ def create_refund(self, request, order, lines, _quantities): # pylint: disable=
return self.reload_page()

def _is_order_from_mobile(self, order):
processor_responses = order.basket.paymentprocessorresponse_set.all()
return any(response.processor_name in MOBILE_PAYMENT_PROCESSORS
for response in processor_responses)
return order.basket.paymentprocessorresponse_set.filter(processor_name__in=MOBILE_PAYMENT_PROCESSORS).exists()

0 comments on commit 12c2118

Please sign in to comment.