jira/apps/api/plane/space/serializer/state.py

22 lines
554 B
Python
Raw Permalink Normal View History

# Copyright (c) 2023-present Plane Software, Inc. and contributors
# SPDX-License-Identifier: AGPL-3.0-only
# See the LICENSE file for details.
# Module imports
from .base import BaseSerializer
2024-11-21 12:12:44 +00:00
from plane.db.models import State
class StateSerializer(BaseSerializer):
class Meta:
model = State
fields = "__all__"
2024-11-21 12:12:44 +00:00
read_only_fields = ["workspace", "project"]
2023-03-25 18:26:53 +00:00
class StateLiteSerializer(BaseSerializer):
class Meta:
model = State
2024-11-21 12:12:44 +00:00
fields = ["id", "name", "color", "group"]
2023-03-25 18:26:53 +00:00
read_only_fields = fields