From d09c0a04cb09b99fd13e13b80b7a89129f2941e7 Mon Sep 17 00:00:00 2001 From: Alex4386 Date: Thu, 11 Mar 2021 01:57:34 +0900 Subject: [PATCH] chore: i am very sorry --- API/v1/Interface/__init__.py | 4 ++-- API/v1/VIF/qos.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/API/v1/Interface/__init__.py b/API/v1/Interface/__init__.py index 29fd281..5a4c835 100644 --- a/API/v1/Interface/__init__.py +++ b/API/v1/Interface/__init__.py @@ -25,8 +25,8 @@ class SRCopyArgs(BaseModel): class QoSTypeArgs(BaseModel): - type: str - info: dict + type: Optional[str] + info: Optional[dict] class VBDCreateArgs(BaseModel): diff --git a/API/v1/VIF/qos.py b/API/v1/VIF/qos.py index 4679c33..44c3ee6 100644 --- a/API/v1/VIF/qos.py +++ b/API/v1/VIF/qos.py @@ -57,11 +57,11 @@ async def vif_get_qos_type_by_uuid(cluster_id: str, vif_uuid: str, data: QoSType vif: VIF = VIF.get_by_uuid(session=session, uuid=vif_uuid) result = True - if data["type"] is not None: - vif.set_qos_type(data["type"]) + if data.type is not None: + vif.set_qos_type(data.type) - if data["info"] is not None: - vif.set_qos_info(data["info"]) + if data.info is not None: + vif.set_qos_info(data.info) ret = dict(success=True, data=result)