Skip to main content

add

Function add 

Source
pub async fn add(
    pool: &PgPool,
    actor: &Actor,
    parent_revision_id: Uuid,
    input: NewBomLine,
) -> AppResult<BomLine>
Expand description

Adds a BOM line to an in-work revision.

§Invariants

  • Permission: the child item is visible (“not found” otherwise); the parent revision is checked out by the actor (409 otherwise) and editable (revisions::ensure_editable: in work, CAD editor of its group); the line creates no cycle (409) and its find number is free (409).
  • Locks: the parent revision row (revisions::lock).
  • Audit: bom.add.
  • Notifications / webhooks: none.
  • Atomic: one transaction.