aboutsummaryrefslogtreecommitdiffstats
path: root/rust/src/database_models.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/database_models.rs
parent358d0eeafb3e4567bb6f15dbac27711b45f4cfad (diff)
downloadfatcat-3ec460d30c49bd579361e08be74863b5bcd96827.tar.gz
fatcat-3ec460d30c49bd579361e08be74863b5bcd96827.zip
allow deletion of redirect-to-deletion
Diffstat (limited to 'rust/src/database_models.rs')
-rw-r--r--rust/src/database_models.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/rust/src/database_models.rs b/rust/src/database_models.rs
index 82088f28..d5daf9a4 100644
--- a/rust/src/database_models.rs
+++ b/rust/src/database_models.rs
@@ -11,6 +11,7 @@ use uuid::Uuid;
// Ugh. I thought the whole point was to *not* do this, but:
// https://github.com/diesel-rs/diesel/issues/1589
+#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EntityState {
WorkInProgress,
Active(Uuid),
@@ -113,7 +114,7 @@ macro_rules! entity_structs {
(None, None) => Ok(EntityState::Deleted),
(Some(redir), rev) => Ok(EntityState::Redirect(redir, rev)),
(None, Some(rev)) => Ok(EntityState::Active(rev)),
- _ => bail!("Invalid EntityIdentRow state"),
+ //_ => bail!("Invalid EntityIdentRow state"),
}
}
}