File tree Expand file tree Collapse file tree 3 files changed +13
-0
lines changed
Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,10 @@ class ProjectSerializer(BaseSerializers):
7171 def serialize (self ):
7272 data = super ().serialize ()
7373 data ["type" ] = constance .ProjectType .get_name (data ["type" ])
74+ if data .get ("status" ):
75+ data ["status" ] = constance .ProjectStatus .get_name (data ["status" ])
76+ else :
77+ data ["status" ] = "Undefined"
7478 if data .get ("upload_state" ):
7579 data ["upload_state" ] = constance .UploadState (data ["upload_state" ]).name
7680 if data .get ("users" ):
Original file line number Diff line number Diff line change 11from pathlib import Path
22
3+ from superannotate .lib .core .enums import ProjectStatus
34from superannotate .lib .core .enums import AnnotationStatus
45from superannotate .lib .core .enums import ImageQuality
56from superannotate .lib .core .enums import ProjectType
127128INVALID_JSON_MESSAGE = "Invalid json"
128129
129130__alL__ = (
131+ ProjectStatus ,
130132 ProjectType ,
131133 UserRole ,
132134 UploadState ,
Original file line number Diff line number Diff line change @@ -62,6 +62,13 @@ class ImageQuality(BaseTitledEnum):
6262 COMPRESSED = "compressed" , 60
6363
6464
65+ class ProjectStatus (BaseTitledEnum ):
66+ NotStarted = "NotStarted" , 1
67+ InProgress = "InProgress" , 2
68+ Completed = "Completed" , 3
69+ OnHold = "OnHold" , 4
70+
71+
6572class ExportStatus (BaseTitledEnum ):
6673 IN_PROGRESS = "inProgress" , 1
6774 COMPLETE = "complete" , 2
You can’t perform that action at this time.
0 commit comments