summaryrefslogtreecommitdiffstats
path: root/rust/src
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-06-14 10:48:37 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-06-14 10:48:37 -0700
commit0158e2edc964f8151f91c17454fa160426343475 (patch)
tree65447232bd0c38ebeb5b5d480e351371717abfdb /rust/src
parente630bdbda05507ceac205bdd1dad84d0dd881d75 (diff)
downloadfatcat-0158e2edc964f8151f91c17454fa160426343475.tar.gz
fatcat-0158e2edc964f8151f91c17454fa160426343475.zip
allow editing of WIP entities
Diffstat (limited to 'rust/src')
-rw-r--r--rust/src/entity_crud.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/rust/src/entity_crud.rs b/rust/src/entity_crud.rs
index 240a7d92..3a1597ec 100644
--- a/rust/src/entity_crud.rs
+++ b/rust/src/entity_crud.rs
@@ -408,11 +408,6 @@ macro_rules! generic_db_update {
fn db_update(&self, conn: &DbConn, edit_context: &EditContext, ident: FatcatId) -> Result<Self::EditRow> {
let current: Self::IdentRow = $ident_table::table.find(ident.to_uuid()).first(conn)?;
let no_redirect: Option<Uuid> = None;
- // TODO: is this actually true? or should we allow updates in the same editgroup?
- if current.is_live != true {
- return Err(FatcatError::InvalidEntityStateTransform(
- "can't update an entity that doesn't exist yet".to_string()).into());
- }
// Don't set prev_rev if current status is redirect
let prev_rev = match current.redirect_id {
Some(_) => None,
@@ -503,7 +498,7 @@ macro_rules! generic_db_delete {
let current: Self::IdentRow = $ident_table::table.find(ident.to_uuid()).first(conn)?;
if current.is_live != true {
return Err(FatcatError::InvalidEntityStateTransform(
- "can't update an entity that doesn't exist yet; delete edit object instead"
+ "can't delete an entity that doesn't exist yet; delete edit object instead"
.to_string(),
)
.into());