Skip to content

Commit

Permalink
v6.0.0-beta.13, Fixed the mongodb configuration error caused by savin…
Browse files Browse the repository at this point in the history
…g the configuration
  • Loading branch information
trueai-org committed Jan 21, 2025
1 parent 4fd7394 commit 5456d49
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/Midjourney.API/Controllers/AdminController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1847,8 +1847,13 @@ public Result SettingEdit([FromBody] Setting setting)
return Result.Fail("演示模式,禁止操作");
}

var oldSetting = GlobalConfiguration.Setting;

setting.Id = Constants.DEFAULT_SETTING_ID;

// 保留原来的配置
setting.IsMongo = oldSetting.IsMongo;

LiteDBHelper.SettingStore.Update(setting);

GlobalConfiguration.Setting = setting;
Expand Down
2 changes: 1 addition & 1 deletion src/Midjourney.Infrastructure/GlobalConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class GlobalConfiguration
/// <summary>
/// 版本号
/// </summary>
public static string Version { get; set; } = "v6.0.0-beta.12";
public static string Version { get; set; } = "v6.0.0-beta.13";

/// <summary>
/// 全局配置项
Expand Down

0 comments on commit 5456d49

Please sign in to comment.