Merge pull request #485 from SuanmoSuanyangTechnology/feature/default-ontology
[add] Default label for the entity type
This commit is contained in:
@@ -636,6 +636,7 @@ async def classes_handler(
|
||||
scene_id=scene_uuid,
|
||||
scene_name=scene.scene_name,
|
||||
scene_description=scene.scene_description,
|
||||
is_system_default=scene.is_system_default,
|
||||
items=items
|
||||
)
|
||||
|
||||
|
||||
@@ -374,7 +374,7 @@ class OntologySceneRepository:
|
||||
|
||||
count = self.db.query(OntologyScene).filter(
|
||||
OntologyScene.scene_id == scene_id,
|
||||
OntologyScene.workspace_id == workspace_id
|
||||
(OntologyScene.workspace_id == workspace_id) | (OntologyScene.is_system_default == True)
|
||||
).count()
|
||||
|
||||
is_owner = count > 0
|
||||
|
||||
@@ -463,6 +463,7 @@ class ClassListResponse(BaseModel):
|
||||
scene_id: UUID = Field(..., description="所属场景ID")
|
||||
scene_name: str = Field(..., description="场景名称")
|
||||
scene_description: Optional[str] = Field(None, description="场景描述")
|
||||
is_system_default: bool = Field(False, description="是否为系统默认场景")
|
||||
items: List[ClassResponse] = Field(..., description="类型列表")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user