Browse Source

Merge pull request #3215 from stefan0xC/fix-post-emergency-access

don't nullify key when editing emergency access
pull/3228/head^2
Daniel García 2 years ago
committed by GitHub
parent
commit
53fa8da5b1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/api/core/emergency_access.rs

4
src/api/core/emergency_access.rs

@ -123,7 +123,9 @@ async fn post_emergency_access(
emergency_access.atype = new_type;
emergency_access.wait_time_days = data.WaitTimeDays;
emergency_access.key_encrypted = data.KeyEncrypted;
if data.KeyEncrypted.is_some() {
emergency_access.key_encrypted = data.KeyEncrypted;
}
emergency_access.save(&mut conn).await?;
Ok(Json(emergency_access.to_json()))

Loading…
Cancel
Save