summaryrefslogtreecommitdiffstats
path: root/rust/src
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-09-11 19:05:33 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-09-11 19:05:33 -0700
commit99306a4dab4919c1c9fed338560f8c3e01a6382f (patch)
tree88524ecd156352abd74db282d225037a965469b4 /rust/src
parent459ca4e1aa4a22e4adf3c275a80368949dd52e8c (diff)
downloadfatcat-99306a4dab4919c1c9fed338560f8c3e01a6382f.tar.gz
fatcat-99306a4dab4919c1c9fed338560f8c3e01a6382f.zip
more subtle local ident check in release.db_expand()
Diffstat (limited to 'rust/src')
-rw-r--r--rust/src/api_entity_crud.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/rust/src/api_entity_crud.rs b/rust/src/api_entity_crud.rs
index 1cb9adf8..461e1c7f 100644
--- a/rust/src/api_entity_crud.rs
+++ b/rust/src/api_entity_crud.rs
@@ -685,11 +685,11 @@ impl EntityCrud for ReleaseEntity {
generic_db_insert_rev!();
fn db_expand(&mut self, conn: &DbConn, expand: ExpandFlags) -> Result<()> {
- let ident = match &self.ident {
- None => bail!("Can't expand a non-concrete entity"),
- Some(s) => FatCatId::from_str(&s)?,
- };
if expand.files {
+ let ident = match &self.ident {
+ None => bail!("Can't expand files on a non-concrete entity"),
+ Some(s) => FatCatId::from_str(&s)?,
+ };
self.files = Some(get_release_files(ident, conn)?);
}
if expand.container {