perf: 优化账号历史过滤

This commit is contained in:
ibuler
2023-04-19 10:37:46 +08:00
committed by Jiangjie.Bai
parent fc4a77df1a
commit 12adf66f41
4 changed files with 12 additions and 20 deletions

View File

@@ -392,6 +392,7 @@ class AccountSecretSerializer(SecretReadableMixin, AccountSerializer):
class AccountHistorySerializer(serializers.ModelSerializer):
secret_type = LabeledChoiceField(choices=SecretType.choices, label=_('Secret type'))
id = serializers.IntegerField(label=_('ID'), source='history_id', read_only=True)
class Meta:
model = Account.history.model