Skip to content

Commit

Permalink
perf(misc): do not request additional details for review title
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnisDa committed Aug 28, 2024
1 parent eda1a27 commit 09239b9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions crates/services/miscellaneous/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2594,19 +2594,23 @@ impl MiscellaneousService {
let (obj_id, obj_title, entity_lot) = if let Some(mi) = insert.metadata_id.unwrap() {
(
mi.to_string(),
self.generic_metadata(&mi).await?.model.title,
Metadata::find_by_id(mi).one(&self.db).await?.unwrap().title,
EntityLot::Metadata,
)
} else if let Some(mgi) = insert.metadata_group_id.unwrap() {
(
mgi.to_string(),
self.metadata_group_details(mgi).await?.details.title,
MetadataGroup::find_by_id(mgi)
.one(&self.db)
.await?
.unwrap()
.title,
EntityLot::MetadataGroup,
)
} else if let Some(pi) = insert.person_id.unwrap() {
(
pi.to_string(),
self.person_details(pi).await?.details.name,
Person::find_by_id(pi).one(&self.db).await?.unwrap().name,
EntityLot::Person,
)
} else if let Some(ci) = insert.collection_id.unwrap() {
Expand Down

0 comments on commit 09239b9

Please sign in to comment.