summaryrefslogtreecommitdiffstats
path: root/rust/src
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-12-21 15:37:56 -0800
committerBryan Newbold <bnewbold@robocracy.org>2018-12-21 15:39:23 -0800
commita1c457661f3ba528470922eda4383cc544d105c0 (patch)
treeff734b8756131eac522e941cc80a0245eb3ad029 /rust/src
parent5bb99f5f60fedb33f8e1db5801632a04a8581377 (diff)
downloadfatcat-a1c457661f3ba528470922eda4383cc544d105c0.tar.gz
fatcat-a1c457661f3ba528470922eda4383cc544d105c0.zip
allow expand creators in release gets
Diffstat (limited to 'rust/src')
-rw-r--r--rust/src/api_entity_crud.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/rust/src/api_entity_crud.rs b/rust/src/api_entity_crud.rs
index cf17a329..eb7a3ac9 100644
--- a/rust/src/api_entity_crud.rs
+++ b/rust/src/api_entity_crud.rs
@@ -1030,6 +1030,18 @@ impl EntityCrud for ReleaseEntity {
)?);
}
}
+ if expand.creators {
+ if let Some(ref mut contribs) = self.contribs {
+ for contrib in contribs {
+ if let Some(ref creator_id) = contrib.creator_id {
+ contrib.creator = Some(CreatorEntity::db_get(
+ conn,
+ FatCatId::from_str(creator_id)?,
+ HideFlags::none())?);
+ }
+ }
+ }
+ }
Ok(())
}