might fix, who knows
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 40s
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 40s
This commit is contained in:
parent
7485bd2ec8
commit
c93e112ebf
@ -39,7 +39,7 @@ public abstract class ProfileHolder {
|
|||||||
if (profile == null) {
|
if (profile == null) {
|
||||||
T newProfile = clazz.cast(clazz.getDeclaredConstructors()[0].newInstance());
|
T newProfile = clazz.cast(clazz.getDeclaredConstructors()[0].newInstance());
|
||||||
org.bson.Document profiles = document.get("profiles", new org.bson.Document());
|
org.bson.Document profiles = document.get("profiles", new org.bson.Document());
|
||||||
org.bson.Document profileDocument = (org.bson.Document) profiles.getOrDefault(clazz.getSimpleName(), new org.bson.Document());
|
org.bson.Document profileDocument = profiles.isEmpty() ? new org.bson.Document() : profiles.get(clazz.getSimpleName(), new org.bson.Document());
|
||||||
|
|
||||||
newProfile.load(profileDocument, BatApplication.GSON);
|
newProfile.load(profileDocument, BatApplication.GSON);
|
||||||
getProfiles().put(clazz.getSimpleName(), newProfile);
|
getProfiles().put(clazz.getSimpleName(), newProfile);
|
||||||
|
Loading…
Reference in New Issue
Block a user