mirror of
https://gitlab.com/bramw/baserow.git
synced 2025-04-13 16:49:07 +00:00
23 lines
551 B
Python
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
|