From 49722d5c48305829c639aad0511ba5c56e246d7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivar=20Conradi=20=C3=98sthus?= Date: Thu, 25 May 2023 23:00:08 +0200 Subject: [PATCH] fix: use correct event type for maxRevisionId (#3870) We had a small typo where we looked for `segment-update` event instead of `segment-updated`. Changed to use the event constant. --- src/lib/db/event-store.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/db/event-store.ts b/src/lib/db/event-store.ts index 4bd2980006..e4b55e317d 100644 --- a/src/lib/db/event-store.ts +++ b/src/lib/db/event-store.ts @@ -1,4 +1,4 @@ -import { IEvent, IBaseEvent } from '../types/events'; +import { IEvent, IBaseEvent, SEGMENT_UPDATED } from '../types/events'; import { LogProvider, Logger } from '../logger'; import { IEventStore } from '../types/stores/event-store'; import { ITag } from '../types/model'; @@ -159,7 +159,7 @@ class EventStore implements IEventStore { const row = await this.db(TABLE) .max('id') .whereNotNull('feature_name') - .orWhere('type', 'segment-update') + .orWhere('type', SEGMENT_UPDATED) .andWhere('id', '>=', largerThan) .first(); return row ? row.max : -1;