Skip to content

Commit

Permalink
Merge pull request #790 from koriaf/master
Browse files Browse the repository at this point in the history
fix<migrations>: correct import of b64decode in migration 0020
  • Loading branch information
gwasser committed Dec 18, 2019
2 parents b6e9a2c + 015b226 commit 909ecc4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion helpdesk/migrations/0020_depickle_user_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 909ecc4

Please sign in to comment.