From 3697922d43fe8b07a6f221633923dd325f9faee0 Mon Sep 17 00:00:00 2001 From: Andrei Date: Thu, 14 Dec 2023 16:52:58 +0300 Subject: [PATCH] Update serializer.py --- src/python_rucaptcha/core/serializer.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/python_rucaptcha/core/serializer.py b/src/python_rucaptcha/core/serializer.py index b25b0d85..b74df0eb 100644 --- a/src/python_rucaptcha/core/serializer.py +++ b/src/python_rucaptcha/core/serializer.py @@ -20,11 +20,6 @@ class TaskSer(MyBaseModel): type: str -class ErrorFieldsSer(Struct): - errorCode: str = None - errorDescription: str = None - - class CreateTaskBaseSer(MyBaseModel): clientKey: str task: TaskSer = {} @@ -62,8 +57,7 @@ def urls_set(self): """ -class GetTaskResultResponseSer(MyBaseModel, ErrorFieldsSer): - errorId: int = 0 +class GetTaskResultResponseSer(MyBaseModel): status: str = "ready" solution: dict = None cost: float = None @@ -74,3 +68,7 @@ class GetTaskResultResponseSer(MyBaseModel, ErrorFieldsSer): taskId: int = None # control method params balance: float = None + # error info + errorId: int = 0 + errorCode: str = None + errorDescription: str = None