diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-12-21 16:37:45 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-12-21 16:37:45 -0800 |
commit | b2cb78c023670d61e915db1d3341e808940a2197 (patch) | |
tree | cf1289401c6d6b7f0d124e0a37c42f978cf9b6c1 /rust | |
parent | c350cb5eddf369a2ed002401e756cf91de5a04ff (diff) | |
download | fatcat-b2cb78c023670d61e915db1d3341e808940a2197.tar.gz fatcat-b2cb78c023670d61e915db1d3341e808940a2197.zip |
don't expand deleted entities
Diffstat (limited to 'rust')
-rw-r--r-- | rust/src/api_entity_crud.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/rust/src/api_entity_crud.rs b/rust/src/api_entity_crud.rs index eb7a3ac9..6474ba6f 100644 --- a/rust/src/api_entity_crud.rs +++ b/rust/src/api_entity_crud.rs @@ -1014,6 +1014,10 @@ impl EntityCrud for ReleaseEntity { } fn db_expand(&mut self, conn: &DbConn, expand: ExpandFlags) -> Result<()> { + // Don't expand deleted entities + if self.state == Some("deleted".to_string()) { + return Ok(()) + } if expand.files { let ident = match &self.ident { None => bail!("Can't expand files on a non-concrete entity"), |