fix for losing data... LOL

This commit is contained in:
Lee 2024-07-04 05:54:13 +01:00
parent 7f09c6d06c
commit 188124991e
2 changed files with 2 additions and 2 deletions

@ -158,7 +158,7 @@ public class BatGuild extends ProfileHolder {
document.put("_id", id);
document.put("createdAt", createdAt);
Map<String, org.bson.Document> profileDocuments = new HashMap<>();
Map<String, org.bson.Document> profileDocuments = this.document.get("profiles", new HashMap<>());
for (Serializable profile : getProfiles().values()) {
profileDocuments.put(profile.getClass().getSimpleName(), profile.serialize(BatApplication.GSON));
}

@ -113,7 +113,7 @@ public class BatUser extends ProfileHolder {
document.put("_id", id);
document.put("createdAt", createdAt);
Map<String, org.bson.Document> profileDocuments = new HashMap<>();
Map<String, org.bson.Document> profileDocuments = this.document.get("profiles", new HashMap<>());
for (Serializable profile : getProfiles().values()) {
profileDocuments.put(profile.getClass().getSimpleName(), profile.serialize(BatApplication.GSON));
}