wata189 / bookutil-backend

0 stars 0 forks source link

本棚登録・図書館チェックでエラー #98

Closed wata189 closed 2 days ago

wata189 commented 2 days ago

Error: Value for argument "data" is not a valid Firestore document. Cannot use "undefined" as a Firestore value (found in field "published_month"). If you want to ignore undefined values, enable ignoreUndefinedProperties. at validateUserInput (/work/node_modules/@google-cloud/firestore/build/src/serializer.js:279:19) at validateUserInput (/work/node_modules/@google-cloud/firestore/build/src/serializer.js:271:13) at validateDocumentData (/work/node_modules/@google-cloud/firestore/build/src/write-batch.js:597:40) at WriteBatch.create (/work/node_modules/@google-cloud/firestore/build/src/write-batch.js:150:9) at Transaction.create (/work/node_modules/@google-cloud/firestore/build/src/transaction.js:157:26) at FirestoreTransaction.createDocument (/work/dist/modules/firestoreUtil.js:54:26) at Object.createBookshelfBook (/work/dist/modules/models.js:381:14) at /work/dist/controller.js:350:26 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async /work/dist/modules/firestoreUtil.js:85:20

wata189 commented 2 days ago

新しく追加した変数はDBから取得した際にUndefinedになる それをそのままDBに登録しようとするとエラー これはローカル環境では出ない

wata189 commented 2 days ago

図書感チェックエラーもたぶん同じやつ