Skip to content

Commit af2efbf

Browse files
committed
fix: kvp types
1 parent 8089471 commit af2efbf

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Lavcode.Service.Sqlite/PasswordService.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,11 @@ await TaskExtend.Run(() =>
141141

142142
Connection.RunInTransaction(() =>
143143
{
144-
Connection.Update(password);
144+
Connection.Update(PasswordEntity.FromModel(password));
145145
if (!skipIcon && password.Icon != null)
146146
{
147147
password.Icon.Id = password.Id;
148-
Connection.Update(password.Icon);
148+
Connection.Update(IconEntity.FromModel(password.Icon));
149149
}
150150

151151
if (!skipKvp && password.KeyValuePairs != null)
@@ -156,7 +156,8 @@ await TaskExtend.Run(() =>
156156
kvp.Id = Guid.NewGuid().ToString();
157157
kvp.PasswordId = password.Id;
158158
}
159-
Connection.InsertAll(password.KeyValuePairs);
159+
var list = password.KeyValuePairs.Select(item => KeyValuePairEntity.FromModel(item)).ToArray();
160+
Connection.InsertAll(list);
160161
}
161162
});
162163
});

0 commit comments

Comments
 (0)