From 296d988d08b4642aa5ae6e3dbc32da14a6bf6837 Mon Sep 17 00:00:00 2001 From: nikita Date: Fri, 23 Nov 2018 11:27:05 +0300 Subject: [PATCH] command fixes --- .../management/commands/send_transactions_to_roistat.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/apps/payment/management/commands/send_transactions_to_roistat.py b/apps/payment/management/commands/send_transactions_to_roistat.py index 3db2e864..cd5ab662 100644 --- a/apps/payment/management/commands/send_transactions_to_roistat.py +++ b/apps/payment/management/commands/send_transactions_to_roistat.py @@ -24,16 +24,13 @@ class Command(BaseCommand): for payment in payments: logger.info('TRANSACTION: ' + str(payment.id)) - pingback = Pingback(payment.data) - splitted = pingback.get_product().get_id().split('_') - product_type_name, payment_id = '_'.join(splitted[:-1]), splitted[-1] transaction_to_roistat( payment.user.id, payment.id, - f'{product_type_name.title()} payment', + f'Payment {payment.id}', payment.amount, payment.update_at.strftime('%Y-%m-%d %H:%M:%S'), - pingback.get_type(), - product_type_name, + 0, + f'Payment {payment.id}', payment.roistat_visit, )