fix(crypto): 有时解密失败 (#5003)

* fix(nodes): 节点默认按 value 排序

* fix(crypto): 有时解密失败

Co-authored-by: xinwen <coderWen@126.com>
pull/5010/head
fit2bot 2020-11-16 14:47:27 +08:00 committed by GitHub
parent 18d8f59bb5
commit 9af4d5f76f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -407,7 +407,7 @@ class Node(OrgModelMixin, SomeNodesMixin, FamilyMixin, NodeAssetsMixin):
class Meta:
verbose_name = _("Node")
ordering = ['key']
ordering = ['value']
def __str__(self):
return self.full_value

View File

@ -189,7 +189,7 @@ class Crypto:
if origin_text:
# 有时不同算法解密不报错,但是返回空字符串
return origin_text
except (TypeError, ValueError, UnicodeDecodeError):
except (TypeError, ValueError, UnicodeDecodeError, IndexError):
continue