chore: formatting changes
This commit is contained in:
parent
a446bc043e
commit
0dbd4cfe97
267 changed files with 2478 additions and 7981 deletions
|
|
@ -4,11 +4,7 @@ from rest_framework import serializers
|
|||
# Module imports
|
||||
from .base import BaseSerializer
|
||||
from .issue import IssueStateSerializer
|
||||
from plane.db.models import (
|
||||
Cycle,
|
||||
CycleIssue,
|
||||
CycleUserProperties,
|
||||
)
|
||||
from plane.db.models import Cycle, CycleIssue, CycleUserProperties
|
||||
|
||||
|
||||
class CycleWriteSerializer(BaseSerializer):
|
||||
|
|
@ -18,20 +14,13 @@ class CycleWriteSerializer(BaseSerializer):
|
|||
and data.get("end_date", None) is not None
|
||||
and data.get("start_date", None) > data.get("end_date", None)
|
||||
):
|
||||
raise serializers.ValidationError(
|
||||
"Start date cannot exceed end date"
|
||||
)
|
||||
raise serializers.ValidationError("Start date cannot exceed end date")
|
||||
return data
|
||||
|
||||
class Meta:
|
||||
model = Cycle
|
||||
fields = "__all__"
|
||||
read_only_fields = [
|
||||
"workspace",
|
||||
"project",
|
||||
"owned_by",
|
||||
"archived_at",
|
||||
]
|
||||
read_only_fields = ["workspace", "project", "owned_by", "archived_at"]
|
||||
|
||||
|
||||
class CycleSerializer(BaseSerializer):
|
||||
|
|
@ -87,18 +76,11 @@ class CycleIssueSerializer(BaseSerializer):
|
|||
class Meta:
|
||||
model = CycleIssue
|
||||
fields = "__all__"
|
||||
read_only_fields = [
|
||||
"workspace",
|
||||
"project",
|
||||
"cycle",
|
||||
]
|
||||
read_only_fields = ["workspace", "project", "cycle"]
|
||||
|
||||
|
||||
class CycleUserPropertiesSerializer(BaseSerializer):
|
||||
class Meta:
|
||||
model = CycleUserProperties
|
||||
fields = "__all__"
|
||||
read_only_fields = [
|
||||
"workspace",
|
||||
"project",
|
||||
"cycle" "user",
|
||||
]
|
||||
read_only_fields = ["workspace", "project", "cycle" "user"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue