diff --git a/crates/db_schema/src/impls/person.rs b/crates/db_schema/src/impls/person.rs index 5c808a9c0..c06c1c728 100644 --- a/crates/db_schema/src/impls/person.rs +++ b/crates/db_schema/src/impls/person.rs @@ -19,6 +19,14 @@ impl Crud for Person { type InsertForm = PersonInsertForm; type UpdateForm = PersonUpdateForm; type IdType = PersonId; + async fn read(pool: &mut DbPool<'_>, person_id: PersonId) -> Result { + let conn = &mut get_conn(pool).await?; + person::table + .filter(person::deleted.eq(false)) + .find(person_id) + .first::(conn) + .await + } async fn delete(pool: &mut DbPool<'_>, person_id: PersonId) -> Result { let conn = &mut get_conn(pool).await?;