Skip to content

Commit

Permalink
Fix flake8 again
Browse files Browse the repository at this point in the history
  • Loading branch information
PSzczepanski1996 committed Jan 22, 2024
1 parent c51ac04 commit 1ad95cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[flake8]
max-line-length = 99
ignore = E231
exclude = migrations,
settings_local.py,
manage.py,
Expand Down
3 changes: 2 additions & 1 deletion tpay_module/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ def post(self, request, *args, **kwargs): # noqa: D102
payment_part = f'{payment.price.amount}{payment.number}'
secure_code = getattr(settings, 'TPAY_SECURE_CODE', None)
if secure_code:
id_part = data['id'] + data['tr_id']
probable_md5 = hashlib.md5(
f'{data["id"]}{data["tr_id"]}{payment_part}{secure_code}'.encode('utf-8'),
f'{id_part}{payment_part}{secure_code}'.encode('utf-8'),
).hexdigest()
get_price = '{:.2f}'.format(float(request.POST['tr_paid'])) # noqa: P101
price_check = Decimal(get_price) == payment.price.amount
Expand Down

0 comments on commit 1ad95cf

Please sign in to comment.