Parcourir la source

修复台账读取bug

ellisran il y a 1 an
Parent
commit
8fceb0c63e
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      app/controller/change_controller.js

+ 2 - 1
app/controller/change_controller.js

@@ -544,6 +544,7 @@ module.exports = app => {
                 await this.layout('change/information.ejs', renderData, 'change/information_modal.ejs');
             } catch (err) {
                 this.log(err);
+                ctx.session.postError = err.toString();
                 ctx.redirect('/tender/' + ctx.params.id + '/change');
             }
         }
@@ -851,7 +852,7 @@ module.exports = app => {
                     if (ledgerIdList.length > 0) {
                         for (const lid of ledgerIdList) {
                             const data = ctx.helper._.find(ledgerData, { id: lid });
-                            data.cid = 1;
+                            if (data) data.cid = 1;
                         }
                     }
                 }