yazid138 2 anni fa
parent
commit
99f960763c
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      controller/sanksi.controller.js

+ 2 - 1
controller/sanksi.controller.js

@@ -359,7 +359,8 @@ exports.getAll = handleError(async (req, res) => {
           'jawaban.cabut_sanksi': { $exists: false, $eq: null }
         },
         {
-          bypass_cabut_sanksi: { $eq: true }
+          bypass_cabut_sanksi: { $eq: true },
+          'jawaban.cabut_sanksi.status': { $ne: "Diterima" }
         }
       ]
       // where.$or = where.$or.map(e => ({ ...e, ['pengajuan.cabut_sanksi']: { $exists: true, $ne: null } }))