From 0158e2edc964f8151f91c17454fa160426343475 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 14 Jun 2019 10:48:37 -0700 Subject: allow editing of WIP entities --- rust/src/entity_crud.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'rust/src') 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 { let current: Self::IdentRow = $ident_table::table.find(ident.to_uuid()).first(conn)?; let no_redirect: Option = 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()); -- cgit v1.2.3