* feat: state list endpoint * dev: update states endpoint * dev: mark default state endpoint
29 lines
595 B
Python
29 lines
595 B
Python
# Module imports
|
|
from .base import BaseSerializer
|
|
from .workspace import WorkspaceLiteSerializer
|
|
from .project import ProjectLiteSerializer
|
|
|
|
from plane.db.models import State
|
|
|
|
|
|
class StateSerializer(BaseSerializer):
|
|
|
|
class Meta:
|
|
model = State
|
|
fields = "__all__"
|
|
read_only_fields = [
|
|
"workspace",
|
|
"project",
|
|
]
|
|
|
|
|
|
class StateLiteSerializer(BaseSerializer):
|
|
class Meta:
|
|
model = State
|
|
fields = [
|
|
"id",
|
|
"name",
|
|
"color",
|
|
"group",
|
|
]
|
|
read_only_fields = fields
|