pub async fn update(
pool: &PgPool,
actor: &Actor,
id: Uuid,
settings: AttributeSettings,
) -> AppResult<AttributeDef>Expand description
Changes label, unit, choices, item types, order and the active flag (administrators). Key and data type stay.
§Invariants
- Permission: admin role (403 otherwise); an unknown definition is “not found”.
- Locks: the definition row (
FOR UPDATE). - Audit:
attribute.update. - Notifications / webhooks: none.
- Atomic: one transaction.