From fdd0abb07e6ed29ef7e02a00408727122c508ae0 Mon Sep 17 00:00:00 2001 From: nineven Date: Fri, 28 Jan 2022 05:15:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=B7=BB=E5=8A=A0=E5=BC=80?= =?UTF-8?q?=E5=8F=91=E8=80=85=E8=B4=A6=E5=8F=B7=E6=A3=80=E6=B5=8B=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fir_ser/api/views/supersign.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/fir_ser/api/views/supersign.py b/fir_ser/api/views/supersign.py index 12e5a3c..59be6d9 100644 --- a/fir_ser/api/views/supersign.py +++ b/fir_ser/api/views/supersign.py @@ -222,6 +222,7 @@ class DeveloperView(APIView): return Response(res.dict) def post(self, request): + res = BaseResponse() data = request.data data_info = {} if data.get("auth_type") == 0: @@ -237,9 +238,16 @@ class DeveloperView(APIView): logger.error(f"user {request.user} add new developer {data.get('issuer_id', '')} data {data_info}") developer_obj = AppIOSDeveloperInfo.objects.create(user_id=request.user, **data_info) IosUtils.create_developer_space(developer_obj, request.user) + status, result = IosUtils.active_developer(developer_obj) + if not status: + res.code = 1008 + res.msg = result.get("return_info", "未知错误") + return Response(res.dict) + else: + IosUtils.get_device_from_developer(developer_obj) + except Exception as e: logger.error(f"user {request.user} create developer {data_info} failed Exception:{e}") - res = BaseResponse() res.code = 1005 res.msg = "添加失败" return Response(res.dict)