diff --git a/libs/database/src/user.rs b/libs/database/src/user.rs index 4f64f7130..fa50a69e1 100644 --- a/libs/database/src/user.rs +++ b/libs/database/src/user.rs @@ -251,7 +251,10 @@ pub async fn select_name_and_email_from_uuid( Ok((row.name, row.email)) } -pub async fn select_web_user_from_uid(pool: &PgPool, uid: i64) -> Result { +pub async fn select_web_user_from_uid( + pool: &PgPool, + uid: i64, +) -> Result, AppError> { let row = sqlx::query_as!( AFWebUser, r#" @@ -264,7 +267,7 @@ pub async fn select_web_user_from_uid(pool: &PgPool, uid: i64) -> Result Some(select_web_user_from_uid(pg_pool, uid).await?), + Some(uid) => select_web_user_from_uid(pg_pool, uid).await?, None => None, }; let last_editor = match view.last_edited_by { - Some(uid) => Some(select_web_user_from_uid(pg_pool, uid).await?), + Some(uid) => select_web_user_from_uid(pg_pool, uid).await?, None => None, }; let publish_view_ids = select_published_view_ids_for_workspace(pg_pool, workspace_id)