[Bugfix] 修复解密None的bug

pull/1217/head
ibuler 2018-04-19 16:35:38 +08:00
parent 95a8bf0988
commit 763cf0d981
1 changed files with 2 additions and 0 deletions

View File

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