diff --git a/src/Artemis.Storage.Legacy/Entities/Workshop/EntryEntity.cs b/src/Artemis.Storage.Legacy/Entities/Workshop/EntryEntity.cs index aaeecd3bd..24c7a2efb 100644 --- a/src/Artemis.Storage.Legacy/Entities/Workshop/EntryEntity.cs +++ b/src/Artemis.Storage.Legacy/Entities/Workshop/EntryEntity.cs @@ -1,4 +1,5 @@ -using System.Text.Json.Nodes; +using System.Text.Json; +using System.Text.Json.Nodes; namespace Artemis.Storage.Legacy.Entities.Workshop; @@ -16,7 +17,7 @@ internal class EntryEntity public string ReleaseVersion { get; set; } = string.Empty; public DateTimeOffset InstalledAt { get; set; } - public Dictionary? Metadata { get; set; } + public Dictionary? Metadata { get; set; } public Storage.Entities.Workshop.EntryEntity Migrate() { @@ -31,7 +32,7 @@ internal class EntryEntity ReleaseId = ReleaseId, ReleaseVersion = ReleaseVersion, InstalledAt = InstalledAt, - Metadata = Metadata ?? new Dictionary() + Metadata = Metadata?.ToDictionary(kvp => kvp.Key, kvp => JsonSerializer.SerializeToNode(kvp.Value) ?? new JsonObject()) }; } } \ No newline at end of file