Skip to content

Commit aba1579

Browse files
committed
fix the range filter query size
1 parent 2265cee commit aba1579

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

utils/progresses.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,11 @@ const buildRangeProgressQuery = (queryParams) => {
149149
const getProgressRecords = async (query, queryParams) => {
150150
const { startDate, endDate } = queryParams;
151151
const docsData = {};
152-
const progressesDocs = (await query.get()).docs;
153-
if (!progressesDocs.size) {
152+
const queryResult = await query.get();
153+
if (!queryResult.size) {
154154
throw new NotFound(PROGRESS_DOCUMENT_NOT_FOUND);
155155
}
156+
const progressesDocs = queryResult.docs;
156157
progressesDocs.forEach((doc) => {
157158
const date = new Date(doc.data().date).toISOString().slice(0, 10);
158159
docsData[date] = true;

0 commit comments

Comments
 (0)