Skip to content

Commit 78b63ce

Browse files
Fix default data store config id
1 parent 8a9c0f1 commit 78b63ce

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/Certify.Core/Management/CertifyManager/CertifyManager.DataStores.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ public partial class CertifyManager
1616
{
1717
private object _dataStoreLocker = new object();
1818

19-
2019
private async Task InitDataStore()
2120
{
2221
var enableExtendedDataStores = true;
@@ -29,7 +28,7 @@ private async Task InitDataStore()
2928
var defaultStoreId = CoreAppSettings.Current.ConfigDataStoreConnectionId;
3029
var dataStoreInfo = await GetDataStore(defaultStoreId);
3130

32-
if (string.IsNullOrEmpty(defaultStoreId) || defaultStoreId == "(default)")
31+
if (string.IsNullOrEmpty(defaultStoreId) || defaultStoreId == "(default)" || defaultStoreId == "0")
3332
{
3433
// default sqlite storage
3534
_itemManager = new SQLiteManagedItemStore("", _serviceLog);

src/Certify.Models/Config/Preferences.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public class Preferences : BindableBase
111111
/// <summary>
112112
/// Id of the data store connection configuration to use. 0 is the default scheme using local SQLite
113113
/// </summary>
114-
public string ConfigDataStoreConnectionId { get; set; } = "0";
114+
public string? ConfigDataStoreConnectionId { get; set; } = "(default)";
115115

116116
/// <summary>
117117
/// If set, defines the default key type used for private keys

src/Certify.UI.Shared/ViewModel/AppViewModel/AppViewModel.Settings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public virtual async Task SavePreferences()
136136
// set datastoreid and feature flags to pass model validation
137137
if (Preferences.ConfigDataStoreConnectionId == null)
138138
{
139-
Preferences.ConfigDataStoreConnectionId = "0";
139+
Preferences.ConfigDataStoreConnectionId = "(default)";
140140
}
141141

142142
if (Preferences.FeatureFlags == null)

0 commit comments

Comments
 (0)