aboutsummaryrefslogtreecommitdiffstats
path: root/rust/src/api_entity_crud.rs
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-12-20 19:05:05 -0800
committerBryan Newbold <bnewbold@robocracy.org>2018-12-20 19:05:05 -0800
commit3ec460d30c49bd579361e08be74863b5bcd96827 (patch)
tree62d4ecf06cbe3a1a1a1d57813689a612709eb011 /rust/src/api_entity_crud.rs
parent358d0eeafb3e4567bb6f15dbac27711b45f4cfad (diff)
downloadfatcat-3ec460d30c49bd579361e08be74863b5bcd96827.tar.gz
fatcat-3ec460d30c49bd579361e08be74863b5bcd96827.zip
allow deletion of redirect-to-deletion
Diffstat (limited to 'rust/src/api_entity_crud.rs')
-rw-r--r--rust/src/api_entity_crud.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/src/api_entity_crud.rs b/rust/src/api_entity_crud.rs
index 605c27ed..71c6c96e 100644
--- a/rust/src/api_entity_crud.rs
+++ b/rust/src/api_entity_crud.rs
@@ -289,7 +289,7 @@ macro_rules! generic_db_delete {
)
.into());
}
- if current.rev_id.is_none() {
+ if current.state()? == EntityState::Deleted {
return Err(ErrorKind::InvalidEntityStateTransform(
"entity was already deleted".to_string(),
)