2022-11-08 12:33:55 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
#
|
2022-11-09 07:42:21 +00:00
|
|
|
from django.utils.translation import ugettext_lazy as _
|
2022-11-08 12:33:55 +00:00
|
|
|
from assets.models import GatherAccountsAutomation
|
|
|
|
from common.utils import get_logger
|
|
|
|
|
|
|
|
from .base import BaseAutomationSerializer
|
|
|
|
|
|
|
|
logger = get_logger(__file__)
|
|
|
|
|
|
|
|
__all__ = [
|
|
|
|
'GatherAccountAutomationSerializer',
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
class GatherAccountAutomationSerializer(BaseAutomationSerializer):
|
|
|
|
class Meta:
|
|
|
|
model = GatherAccountsAutomation
|
2022-11-09 07:42:21 +00:00
|
|
|
read_only_fields = BaseAutomationSerializer.Meta.read_only_fields + ['executed_amount']
|
2022-11-08 12:33:55 +00:00
|
|
|
fields = BaseAutomationSerializer.Meta.fields + read_only_fields
|
2022-11-09 07:42:21 +00:00
|
|
|
|
|
|
|
extra_kwargs = {**BaseAutomationSerializer.Meta.extra_kwargs, **{
|
|
|
|
'executed_amount': {'label': _('Executed amount')}
|
|
|
|
}}
|