Skip to content

Commit

Permalink
Merge branch 'main' into LBAC-1390-Enrichir-la-m-canique-de-g-n-ratio…
Browse files Browse the repository at this point in the history
…n-de-lien-profond-dans-notre-API-pour-BAL
  • Loading branch information
antoinebigard authored Oct 18, 2023
2 parents 8829788 + 66138bd commit 77f738b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/src/jobs/database/validateModels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ import { Pagination } from "@/common/model/schema/_shared/mongoose-paginate"

async function validateModel<T>(model: Model<T> | Pagination<T>, z: ZodType<T, any, any>) {
const collectionName = model.collection.name
const cursor = await model.find({}).lean()
const cursor = model.find({}).lean()

let totalCount = 0
let count = 0
const errorStats: Record<string, number> = {}
for (const doc of cursor) {
for await (const doc of cursor) {
try {
totalCount++
z.parse(doc)
Expand Down

0 comments on commit 77f738b

Please sign in to comment.