lrf402788946 4 年之前
父节点
当前提交
16a9e6d4ac
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/service/patient.js

+ 1 - 1
app/service/patient.js

@@ -55,7 +55,7 @@ class PatientService extends CrudService {
       } else {
         console.log(group.patients);
         console.log(entity._id);
-        const groupPatient = group.patients.filter(fil => fil.patientid === entity._id);
+        const groupPatient = group.patients.find(fil => ObjectId(fil.patientid).equals(entity._id));
         if (groupPatient) {
           throw new BusinessError(ErrorCode.DATA_EXIST, '已经注册,无需重复注册');
         } else {