1
0
Fork 0
mirror of https://gitlab.com/bramw/baserow.git synced 2025-04-13 16:49:07 +00:00
bramw_baserow/backend/src/baserow/api/workflow_actions/serializers.py
2023-12-06 09:44:50 +00:00

23 lines
551 B
Python

from abc import abstractmethod
from rest_framework import serializers
from baserow.core.workflow_actions.models import WorkflowAction
class WorkflowActionSerializer(serializers.ModelSerializer):
type = serializers.SerializerMethodField(
help_text="The type of the workflow action"
)
class Meta:
model = WorkflowAction
fields = ("id", "order", "type")
extra_kwargs = {
"id": {"read_only": True},
}
@abstractmethod
def get_type(self, instance: WorkflowAction):
pass