Potential fix for option saving

This commit is contained in:
2022-01-25 23:34:37 +03:00
parent 41b49370f9
commit 8ca58f7596
7 changed files with 23 additions and 10 deletions
+2 -2
View File
@@ -116,7 +116,7 @@ namespace West.TelegramBot.ChatManagement.Handler
_logger.LogDebug("Saving receiver rep with value: {Value}", receiverRepCount);
receiverRepOption.SetValue(receiverRepCount);
Db.Update(receiverRepOption);
Db.AddOrUpdate(receiverRepOption);
_logger.LogDebug("Updated value: {Value}", receiverRepOption.GetValue<double>());
await Reply($"{From.ToHtml()}<code>({await GetUserReputation(From)}) " +
@@ -141,7 +141,7 @@ namespace West.TelegramBot.ChatManagement.Handler
reputation = Math.Round(reputation, 2);
var opt = await GetReputationOption(RepliedUser);
opt.SetValue(reputation);
Db.Update(opt);
Db.AddOrUpdate(opt);
await Reply(
new HtmlString()