Skip to main content

update_result

Function update_result 

Source
pub async fn update_result(
    pool: &PgPool,
    actor: &Actor,
    id: Uuid,
    input: ResultInput,
) -> AppResult<SimulationResult>
Expand description

Changes a result value of a simulation revision checked out by the actor.

§Invariants

  • Permission: as add_result; a value the actor cannot see is a 404.
  • Locks: the simulation revision (FOR UPDATE).
  • Data: a hand edit clears the value’s source (the origin of an import or exchange file); the same name and load case as another value gets a 409.
  • Audit: simulation.result.update (with the previous value and unit).
  • Notifications / webhooks: none.
  • Atomic: one transaction.