瀏覽代碼

优化删除学校时报错

Li 2 年之前
父節點
當前提交
089900e357
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      TEAMModelBI/Controllers/BISchool/SchoolController.cs

+ 2 - 2
TEAMModelBI/Controllers/BISchool/SchoolController.cs

@@ -867,7 +867,7 @@ namespace TEAMModelBI.Controllers.BISchool
                         var tchBaseResponse = await cosmosClient.GetContainer("TEAMModelOS", "Teacher").ReadItemStreamAsync($"{item}", new PartitionKey("Base"));
                         if (tchBaseResponse.Status == 200)
                         {
-                            using var json = await JsonDocument.ParseAsync(response.ContentStream);
+                            using var json = await JsonDocument.ParseAsync(tchBaseResponse.ContentStream);
                             Teacher teacher = json.ToObject<Teacher>();
                             var tempSc = teacher.schools.Find(f => f.schoolId.Equals($"{tempId}"));
                             if (tempSc != null)
@@ -936,7 +936,7 @@ namespace TEAMModelBI.Controllers.BISchool
             }
             catch (Exception ex)
             {
-                await _dingDing.SendBotMsg($"BI,{_option.Location}  /batchschool/set-del \n {ex.Message}\n{ex.StackTrace}", GroupNames.成都开发測試群組);
+                await _dingDing.SendBotMsg($"BI,{_option.Location}  /schoolcheck/set-del \n {ex.Message}\n{ex.StackTrace}", GroupNames.成都开发測試群組);
                 return BadRequest();
             }
         }