Save nil if empty string.

This commit is contained in:
Max Goedjen 2025-08-31 16:02:39 -07:00
parent 51fed9e593
commit ecd403c7cf
No known key found for this signature in database

View File

@ -53,7 +53,7 @@ struct EditSecretView<StoreType: SecretStoreModifiable>: View {
func rename() { func rename() {
var attributes = secret.attributes var attributes = secret.attributes
attributes.publicKeyAttribution = publicKeyAttribution attributes.publicKeyAttribution = publicKeyAttribution.isEmpty ? nil : publicKeyAttribution
Task { Task {
do { do {
try await store.update(secret: secret, name: name, attributes: attributes) try await store.update(secret: secret, name: name, attributes: attributes)