Skip to main content

remove_item

Function remove_item 

Source
pub async fn remove_item(
    pool: &PgPool,
    actor: &Actor,
    change_id: Uuid,
    revision_id: Uuid,
) -> AppResult<()>
Expand description

Removes a revision from a draft change.

ยงInvariants

  • Permission: CAD editor who is the author (or an administrator); the change is a draft (409); the revision is part of the change (404 otherwise).
  • Locks: the change row (FOR UPDATE), then the revision row (revisions::lock).
  • Audit: change.remove_item.
  • Notifications / webhooks: none.
  • Atomic: one transaction.