[Bugfix] 修复解密None的bug

pull/1217/head
ibuler 7 years ago
parent 95a8bf0988
commit 763cf0d981

@ -72,6 +72,8 @@ class Signer(metaclass=Singleton):
return s.dumps(value) return s.dumps(value)
def unsign(self, value): def unsign(self, value):
if value is None:
return value
s = JSONWebSignatureSerializer(self.secret_key) s = JSONWebSignatureSerializer(self.secret_key)
try: try:
return s.loads(value) return s.loads(value)

Loading…
Cancel
Save