Browse Source

fix: 修复账号模版更新时 添加密码密钥500 (#10454)

Co-authored-by: feng <1304903146@qq.com>
pull/10455/head
fit2bot 2 years ago committed by GitHub
parent
commit
155c241ef7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      apps/accounts/serializers/account/template.py

2
apps/accounts/serializers/account/template.py

@ -35,7 +35,7 @@ class AccountTemplateSerializer(BaseAccountSerializer):
def update(self, instance, validated_data):
diff = {
k: v for k, v in validated_data.items()
if getattr(instance, k) != v
if getattr(instance, k, None) != v
}
instance = super().update(instance, validated_data)
self.sync_accounts_secret(instance, diff)

Loading…
Cancel
Save