From c7cfe9f71902e985f361f54f86e835f99c136bc7 Mon Sep 17 00:00:00 2001 From: cmile Date: Fri, 5 Oct 2018 22:02:08 +0200 Subject: [PATCH] encode bla... --- account/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account/views.py b/account/views.py index b3932ab..b04b9a1 100644 --- a/account/views.py +++ b/account/views.py @@ -155,7 +155,7 @@ def gastropin(request): def calculate_gastro_hash(pin): key = settings.CBASE_GASTRO_KEY bla = '%s%s' % (key, pin) - return hashlib.sha256(bla).hexdigest() + return hashlib.sha256(bla.encode()).hexdigest() return set_hash_field(request, GastroPinForm, 'gastropin1', 'gastroPIN', calculate_gastro_hash, 'gastropin.html')