|
@@ -143,7 +143,12 @@ namespace TEAMModelOS.Controllers
|
|
|
});
|
|
|
await client.GetContainer("TEAMModelOS", "Teacher").ReplaceItemAsync<Syllabus>(syllabusD, request.syllabusId, new PartitionKey($"Syllabus-{request.issuer}"));
|
|
|
request.tmdInfo.ForEach(async x => {
|
|
|
- await client.GetContainer("TEAMModelOS", "Teacher").DeleteItemAsync<Share>(request.syllabusId, new PartitionKey($"Share-{request.type}-{x.tmdid}"));
|
|
|
+ try {
|
|
|
+ await client.GetContainer("TEAMModelOS", "Teacher").DeleteItemAsync<Share>(request.syllabusId, new PartitionKey($"Share-{request.type}-{x.tmdid}"));
|
|
|
+ } catch
|
|
|
+ {
|
|
|
+ //仅处理找不到数据的情况
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
}
|