hotfix for collab crashes (#11885)

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin 2024-05-15 21:04:37 -06:00 committed by GitHub
parent 66e873942d
commit ba8aba4d17
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -48,6 +48,9 @@ impl Database {
/// Returns all users by ID. There are no access checks here, so this should only be used internally.
pub async fn get_users_by_ids(&self, ids: Vec<UserId>) -> Result<Vec<user::Model>> {
if ids.len() >= 10000_usize {
return Err(anyhow!("too many users"))?;
}
self.transaction(|tx| async {
let tx = tx;
Ok(user::Entity::find()