fixup! Refactored migration to run faster

This commit is contained in:
Fabien O'Carroll 2021-09-17 13:54:29 +02:00 committed by Daniel Lockyer
parent 3165315f84
commit 61058fb0a4

View File

@ -30,7 +30,7 @@ module.exports = createTransactionalMigration(
const events = eventsByMember[memberId];
events.sort((a, b) => {
return new Date(b) - new Date(a);
return new Date(b.created_at) - new Date(a.created_at);
});
const mostRecentStatusEvent = events[0];