summaryrefslogtreecommitdiffstats
path: root/rust
diff options
context:
space:
mode:
Diffstat (limited to 'rust')
-rw-r--r--rust/src/api_entity_crud.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/rust/src/api_entity_crud.rs b/rust/src/api_entity_crud.rs
index 151f0502..2f28e858 100644
--- a/rust/src/api_entity_crud.rs
+++ b/rust/src/api_entity_crud.rs
@@ -1018,9 +1018,12 @@ impl EntityCrud for ReleaseEntity {
if self.state == Some("deleted".to_string()) {
return Ok(())
}
- if expand.files {
+ // TODO: should clarify behavior here. Would hit this path, eg, expanding files on a
+ // release revision (not ident). Should we fail (Bad Request), or silently just not include
+ // any files?
+ if expand.files && self.ident.is_some() {
let ident = match &self.ident {
- None => bail!("Can't expand files on a non-concrete entity"),
+ None => bail!("Can't expand files on a non-concrete entity"), // redundant with above is_some()
Some(ident) => match &self.redirect {
// If we're a redirect, then expand for the *target* identifier, not *our*
// identifier. Tricky!