Skip to content

Commit

Permalink
[OneBot] fix litedb auto EmptyStringToNull and TrimWhitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkRRb committed Oct 17, 2024
1 parent 93c35bc commit 3fbc465
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Lagrange.OneBot/LagrangeAppBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ public LagrangeAppBuilder ConfigureOneBot()
{
var logger = provider.GetRequiredService<ILogger<LagrangeAppBuilder>>();

BsonMapper.Global.TrimWhitespace = false;
BsonMapper.Global.EmptyStringToNull = false;

string path = Configuration["ConfigPath:Database"] ?? $"lagrange-{Configuration["Account:Uin"]}.db";

var db = new LiteDatabase(path)
Expand Down

0 comments on commit 3fbc465

Please sign in to comment.