File tree Expand file tree Collapse file tree 3 files changed +16
-1
lines changed
src/superannotate/lib/core Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ class ProjectType(BaseTitledEnum):
9393 TILED = "Tiled" , 5
9494 OTHER = "Other" , 6
9595 POINT_CLOUD = "PointCloud" , 7
96+ CUSTOM_EDITOR = "CustomEditor" , 8
9697
9798 @classproperty
9899 def images (self ):
Original file line number Diff line number Diff line change @@ -15,12 +15,18 @@ class Limit(BaseModel):
1515 max_image_count : Optional [int ]
1616 remaining_image_count : int
1717
18+ class Config :
19+ extra = Extra .ignore
20+
1821
1922class UserLimits (BaseModel ):
2023 user_limit : Optional [Limit ]
2124 project_limit : Limit
2225 folder_limit : Limit
2326
27+ class Config :
28+ extra = Extra .ignore
29+
2430
2531class UploadAnnotationAuthData (BaseModel ):
2632 access_key : str
@@ -80,12 +86,18 @@ class Resource(BaseModel):
8086 failed_items : List [str ] = Field ([], alias = "failedItems" )
8187 missing_resources : Resource = Field ({}, alias = "missingResources" )
8288
89+ class Config :
90+ extra = Extra .ignore
91+
8392
8493class UploadCustomFieldValues (BaseModel ):
8594 succeeded_items : Optional [List [Any ]]
8695 failed_items : Optional [List [str ]]
8796 error : Optional [Any ]
8897
98+ class Config :
99+ extra = Extra .ignore
100+
89101
90102class ServiceResponse (BaseModel ):
91103 status : Optional [int ]
Original file line number Diff line number Diff line change @@ -306,6 +306,8 @@ def validate_project_type(self):
306306 raise ValidationError ("Unsupported project type." )
307307
308308 def _validate_json (self , json_data : dict ) -> list :
309+ if self ._project .type >= constants .ProjectType .PIXEL .value :
310+ return []
309311 use_case = ValidateAnnotationUseCase (
310312 reporter = self .reporter ,
311313 team_id = self ._project .team_id ,
@@ -571,7 +573,7 @@ def get_annotation_from_s3(bucket, path: str):
571573
572574 def prepare_annotation (self , annotation : dict , size ) -> dict :
573575 errors = None
574- if size < BIG_FILE_THRESHOLD :
576+ if size < BIG_FILE_THRESHOLD and self . _project . type < constants . ProjectType . PIXEL . value :
575577 use_case = ValidateAnnotationUseCase (
576578 reporter = self .reporter ,
577579 team_id = self ._project .team_id ,
You can’t perform that action at this time.
0 commit comments