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 {