Skip to main content

update_settings

Function update_settings 

Source
pub async fn update_settings(
    pool: &PgPool,
    actor: &Actor,
    revision_id: Uuid,
    upd: MassSettingsUpdate,
) -> AppResult<RevisionMass>
Expand description

Stores the mass settings of a revision: density override, geometry file with its unit and instance count, measured values.

§Invariants

  • Permission: the revision is visible (“not found” otherwise) and editable by the actor (revisions::ensure_editable: in work, checked out by the actor). The geometry file must be a 3D file of this revision (400). Values are validated (400).
  • Locks: the revision row (revisions::lock).
  • Audit: revision.mass with the new values.
  • Notifications / webhooks: none.
  • Atomic: one transaction.