Skip to content

Commit

Permalink
return empty actions list for users w no actions
Browse files Browse the repository at this point in the history
  • Loading branch information
billyb2 committed Sep 13, 2024
1 parent 973f46f commit 9514b8a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/meta_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,8 @@ FROM
.await?;
Ok(())
}

#[tracing::instrument(err)]
async fn get_actions_for_users(
&self,
user_ids: HashSet<i64>,
Expand Down Expand Up @@ -826,6 +828,12 @@ FROM
actions.push(action_info);
});

for user_id in user_ids.into_iter() {
if !actions.contains_key(&user_id) {
actions.insert(user_id, Vec::new());
}
}

Ok(actions)
}
}

0 comments on commit 9514b8a

Please sign in to comment.