From 21d51f894605243d5d1e57e0da3bd619ecde88c8 Mon Sep 17 00:00:00 2001 From: Agate Berriot Date: Tue, 16 Aug 2022 14:39:04 +0200 Subject: [PATCH 4/5] replaced smart_text with smart_str equivalent (#68183) --- combo/apps/lingo/views.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/combo/apps/lingo/views.py b/combo/apps/lingo/views.py index 9d5380fd..b6b9a524 100644 --- a/combo/apps/lingo/views.py +++ b/combo/apps/lingo/views.py @@ -40,7 +40,7 @@ from django.shortcuts import get_object_or_404 from django.template.response import TemplateResponse from django.urls import reverse from django.utils import dateparse -from django.utils.encoding import force_str, smart_text +from django.utils.encoding import force_str, smart_str from django.utils.http import urlencode from django.utils.translation import gettext_lazy as _ from django.views.decorators.csrf import csrf_exempt @@ -304,7 +304,7 @@ class ValidateTransactionApiView(View): amount = LocaleDecimal(request.GET['amount']) - logger.info('validating amount %s for transaction %s', amount, smart_text(transaction.id)) + logger.info('validating amount %s for transaction %s', amount, smart_str(transaction.id)) try: result = transaction.make_eopayment(request=request).backend.validate( amount, transaction.bank_data @@ -343,7 +343,7 @@ class CancelTransactionApiView(View): amount = LocaleDecimal(request.GET['amount']) - logger.info('cancelling amount %s for transaction %s', amount, smart_text(transaction.id)) + logger.info('cancelling amount %s for transaction %s', amount, smart_str(transaction.id)) try: result = transaction.make_eopayment(request=request).backend.cancel(amount, transaction.bank_data) except eopayment.ResponseError as e: @@ -464,8 +464,8 @@ class PayMixin: return HttpResponseRedirect(get_payment_status_view(next_url=next_url)) logger.info( 'emitted payment request with id %s', - smart_text(order_id), - extra={'eopayment_order_id': smart_text(order_id), 'eopayment_data': repr(data)}, + smart_str(order_id), + extra={'eopayment_order_id': smart_str(order_id), 'eopayment_data': repr(data)}, ) transaction.order_id = order_id transaction.save() -- 2.36.1