fix<migrations>: correct import of b64decode in migration 0020

This commit is contained in:
Arkadiy Korotaev 2019-12-17 19:25:45 +01:00
parent b6e9a2cb80
commit 015b226766
No known key found for this signature in database
GPG Key ID: 4BD092DD84540FAB

View File

@ -9,7 +9,12 @@ def unpickle_settings(settings_pickled):
import pickle
except ImportError:
import cPickle as pickle
from helpdesk.lib import b64decode
try:
# Python 2 support
from base64 import urlsafe_b64decode as b64decode
except ImportError:
# Python 3 support
from base64 import decodebytes as b64decode
try:
return pickle.loads(b64decode(settings_pickled.encode('utf-8')))
except Exception: