diff --git a/src/actors.js b/src/actors.js index 0075962..8443c01 100644 --- a/src/actors.js +++ b/src/actors.js @@ -265,7 +265,7 @@ async function interpolateProfiles(actorIdsOrNames, context) { .transacting(transaction); // insert new interpolated data - const queries = interpolatedProfiles.map((profile) => context.knex('actors') + const queries = interpolatedProfiles.map(async (profile) => context.knex('actors') .where('id', profile.id) .update(profile) .transacting(transaction)); @@ -273,6 +273,8 @@ async function interpolateProfiles(actorIdsOrNames, context) { await Promise.all(queries) .then(transaction.commit) .catch(transaction.rollback); + + await context.knex.schema.refreshMaterializedView('actors_meta'); } module.exports = {