Skip to content

Commit ccf28af

Browse files
committed
Handle lastRowsRead not being set on equipment yet
1 parent 58b4630 commit ccf28af

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/read-models/shared-state/equipment/get.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const transformRow = <
2929
lastQuizSync: O.fromNullable(
3030
row.lastQuizSync
3131
) as O.Option<EpochTimestampMilliseconds>,
32-
lastRowsRead: row.lastRowsRead as LastGoogleSheetRowRead,
32+
lastRowsRead: (row.lastRowsRead ?? {}) as LastGoogleSheetRowRead,
3333
});
3434

3535
export const getEquipmentForAreaMinimal =

tests/google-sheets/async-apply-external.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ describe('Integration asyncApplyExternalEventSources', () => {
202202
)
203203
).cached_data
204204
);
205-
await new Promise(res => setTimeout(res, rateLimitMs * 2)); // The rate limit varies between [rateLimitMs, 2 * rateLimitMs] to spread cpu load.
205+
await new Promise(res => setTimeout(res, rateLimitMs));
206206
results2 = await runAsyncApplyExternalEventSources(framework);
207207
cachedData2 = getRightOrFail(
208208
getSomeOrFail(

0 commit comments

Comments
 (0)